path2: Adjust the API to remove all the _str mutation methods
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
This commit is contained in:
@@ -121,7 +121,7 @@ mod test {
|
||||
fn test_errors_do_not_crash() {
|
||||
// Open /dev/null as a library to get an error, and make sure
|
||||
// that only causes an error, and not a crash.
|
||||
let path = GenericPath::from_str("/dev/null");
|
||||
let path = GenericPath::new("/dev/null");
|
||||
match DynamicLibrary::open(Some(&path)) {
|
||||
Err(_) => {}
|
||||
Ok(_) => fail2!("Successfully opened the empty library.")
|
||||
|
||||
Reference in New Issue
Block a user