Support any bytes container
authorYehuda Katz <wycats@gmail.com>
Thu, 8 May 2014 21:12:38 +0000 (14:12 -0700)
committerYehuda Katz <wycats@gmail.com>
Thu, 8 May 2014 23:50:52 +0000 (16:50 -0700)
tests/support.rs

index 02401f523a1957a9b2325f9ef16db38d697d4090..eee1f7e56e67bdc5b723504efe8e3d9c1c79a1b7 100644 (file)
@@ -3,7 +3,7 @@ use std::io;
 use std::io::fs;
 use std::io::process::{ProcessOutput,ProcessExit};
 use std::os;
-use std::path::{Path};
+use std::path::{Path,BytesContainer};
 use std::str;
 use std::vec::Vec;
 use ham = hamcrest;
@@ -70,7 +70,7 @@ impl ProjectBuilder {
         .extra_path(cargo_dir())
     }
 
-    pub fn file(mut self, path: &str, body: &str) -> ProjectBuilder {
+    pub fn file<B: BytesContainer>(mut self, path: B, body: &str) -> ProjectBuilder {
         self.files.push(FileBuilder::new(self.root.join(path), body));
         self
     }