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:
parent
ed539e1471
commit
d6d9b92683
53 changed files with 1373 additions and 1474 deletions
|
|
@ -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.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue