]> git.lizzy.rs Git - rust.git/blobdiff - src/compiletest/util.rs
auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
[rust.git] / src / compiletest / util.rs
index 942541c79eee7661b8c927ef8e5c165c95a49e81..445e814a1eb04fddb83b39e1bb54c3ef80a8eea7 100644 (file)
@@ -21,6 +21,7 @@
     ("android", "android"),
     ("linux", "linux"),
     ("freebsd", "freebsd"),
+    ("dragonfly", "dragonfly"),
 ];
 
 pub fn get_os(triple: &str) -> &'static str {
@@ -33,25 +34,25 @@ pub fn get_os(triple: &str) -> &'static str {
 }
 
 #[cfg(target_os = "win32")]
-pub fn make_new_path(path: &str) -> StrBuf {
+pub fn make_new_path(path: &str) -> String {
 
     // Windows just uses PATH as the library search path, so we have to
     // maintain the current value while adding our own
-    match getenv(lib_path_env_var().as_slice()) {
+    match getenv(lib_path_env_var()) {
       Some(curr) => {
-        format_strbuf!("{}{}{}", path, path_div(), curr)
+        format!("{}{}{}", path, path_div(), curr)
       }
-      None => path.to_str().to_strbuf()
+      None => path.to_string()
     }
 }
 
 #[cfg(target_os = "win32")]
-pub fn lib_path_env_var() -> StrBuf { "PATH".to_strbuf() }
+pub fn lib_path_env_var() -> &'static str { "PATH" }
 
 #[cfg(target_os = "win32")]
-pub fn path_div() -> StrBuf { ";".to_strbuf() }
+pub fn path_div() -> &'static str { ";" }
 
-pub fn logv(config: &Config, s: StrBuf) {
+pub fn logv(config: &Config, s: String) {
     debug!("{}", s);
     if config.verbose { println!("{}", s); }
 }