cleanup: replace as[_mut]_slice() calls with deref coercions

This commit is contained in:
Jorge Aparicio
2015-02-01 21:53:25 -05:00
parent 2c05354211
commit 17bc7d8d5b
289 changed files with 1372 additions and 1406 deletions

View File

@@ -67,9 +67,9 @@ impl DynamicLibrary {
pub fn prepend_search_path(path: &Path) {
let mut search_path = DynamicLibrary::search_path();
search_path.insert(0, path.clone());
let newval = DynamicLibrary::create_path(search_path.as_slice());
let newval = DynamicLibrary::create_path(&search_path);
env::set_var(DynamicLibrary::envvar(),
str::from_utf8(newval.as_slice()).unwrap());
str::from_utf8(&newval).unwrap());
}
/// From a slice of paths, create a new vector which is suitable to be an