chiark / gitweb /
apitest: Rework OtterArgsSpec trait slightly
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 May 2021 19:10:06 +0000 (20:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 21 May 2021 19:10:06 +0000 (20:10 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/apitest.rs

index c327ee18ef904ec8f79e2dd11b579f9c03230188..dea84a0888bfab58fe5cbc105666f028a5656fab 100644 (file)
@@ -751,9 +751,7 @@ impl<S> OtterArgsSpec for [S] where for <'s> &'s S: Into<String> {
   }
 }
 impl<S> OtterArgsSpec for Vec<S> where for <'s> &'s S: Into<String> {
-  fn to_args(&self) -> Vec<String> {
-    self.iter().map(|s| s.into()).collect()
-  }
+  fn to_args(&self) -> Vec<String> { self.as_slice().to_args() }
 }
 
 impl DirSubst {