about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-02 12:04:32 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2024-07-05 10:53:22 +0200
commit3e4368053ffa72183f32c2c7c790cd6b29713f95 (patch)
tree10b2a339a4ddae2ca6201777e921db60d59ba00c
parentd68fe4eaa81305b53cdddc2339e8efdc2aa1e013 (diff)
downloadrust-3e4368053ffa72183f32c2c7c790cd6b29713f95.tar.gz
rust-3e4368053ffa72183f32c2c7c790cd6b29713f95.zip
Improve `Command::args` API in `run-make-support`
-rw-r--r--src/tools/run-make-support/src/command.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs
index ee651704c6f..c506c3d6b61 100644
--- a/src/tools/run-make-support/src/command.rs
+++ b/src/tools/run-make-support/src/command.rs
@@ -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
     }