renamed str::from_slice to str::to_owned
This commit is contained in:
parent
b7da975049
commit
24ef88cee9
19 changed files with 66 additions and 66 deletions
|
|
@ -12,5 +12,5 @@ struct S { f0: ~str, f1: int }
|
|||
|
||||
pub fn main() {
|
||||
let s = ~"Hello, world!";
|
||||
let _s = S { f0: str::from_slice(s), ..S { f0: s, f1: 23 } };
|
||||
let _s = S { f0: str::to_owned(s), ..S { f0: s, f1: 23 } };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ struct S { f0: ~str, f1: ~str }
|
|||
|
||||
pub fn main() {
|
||||
let s = ~"Hello, world!";
|
||||
let _s = S { f1: str::from_slice(s), f0: s };
|
||||
let _s = S { f1: str::to_owned(s), f0: s };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue