use syntax::abi;
pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {
- let cc_args = if target_triple.as_slice().contains("thumb") {
+ let cc_args = if target_triple.contains("thumb") {
vec!("-mthumb".to_string())
} else {
vec!("-marm".to_string())
"rpath2".to_string(),
"rpath1".to_string()
]);
- assert!(res.as_slice() == [
- "rpath1".to_string(),
- "rpath2".to_string()
+ assert!(res == [
+ "rpath1",
+ "rpath2",
]);
}
"4a".to_string(),
"3".to_string()
]);
- assert!(res.as_slice() == [
- "1a".to_string(),
- "2".to_string(),
- "4a".to_string(),
- "3".to_string()
+ assert!(res == [
+ "1a",
+ "2",
+ "4a",
+ "3",
]);
}
realpath: |p| Ok(p.clone())
};
let res = get_rpath_relative_to_output(config, &Path::new("lib/libstd.so"));
- assert_eq!(res.as_slice(), "$ORIGIN/../lib");
+ assert_eq!(res, "$ORIGIN/../lib");
}
#[test]
realpath: |p| Ok(p.clone())
};
let res = get_rpath_relative_to_output(config, &Path::new("lib/libstd.so"));
- assert_eq!(res.as_slice(), "$ORIGIN/../lib");
+ assert_eq!(res, "$ORIGIN/../lib");
}
#[test]
realpath: |p| Ok(p.clone())
};
let res = get_rpath_relative_to_output(config, &Path::new("lib/libstd.so"));
- assert_eq!(res.as_slice(), "$ORIGIN/../lib");
+ assert_eq!(res, "$ORIGIN/../lib");
}
#[test]
realpath: |p| Ok(p.clone())
};
let res = get_rpath_relative_to_output(config, &Path::new("lib/libstd.so"));
- assert_eq!(res.as_slice(), "@loader_path/../lib");
+ assert_eq!(res, "@loader_path/../lib");
}
}
/// Convenience function that retrieves the result of a digest as a
/// String in hexadecimal format.
fn result_str(&mut self) -> String {
- self.result_bytes().as_slice().to_hex().to_string()
+ self.result_bytes().to_hex().to_string()
}
}
while left > 0u {
let take = (left + 1u) / 2u;
sh.input_str(t.input
- .as_slice()
.slice(len - left, take + len - left));
left = left - take;
}
pub fn adjust_abi(&self, abi: abi::Abi) -> abi::Abi {
match abi {
abi::System => {
- if self.options.is_like_windows && self.arch.as_slice() == "x86" {
+ if self.options.is_like_windows && self.arch == "x86" {
abi::Stdcall
} else {
abi::C
( $($name:ident),+ ) => (
{
let target = target.replace("-", "_");
- let target = target.as_slice();
if false { }
$(
else if target == stringify!($name) {