Improve Command::args API in run-make-support

This commit is contained in:
Guillaume Gomez 2024-07-02 12:04:32 +02:00
parent d68fe4eaa8
commit 3e4368053f

View File

@ -75,11 +75,12 @@ impl Command {
/// Generic command arguments provider. Prefer specific helper methods if possible.
/// Note that for some executables, arguments might be platform specific. For C/C++
/// compilers, arguments might be platform *and* compiler specific.
pub fn args<S>(&mut self, args: &[S]) -> &mut Self
pub fn args<S, V>(&mut self, args: V) -> &mut Self
where
S: AsRef<ffi::OsStr>,
V: AsRef<[S]>,
{
self.cmd.args(args);
self.cmd.args(args.as_ref());
self
}