std: Rename the ToStr
trait to ToString
, and to_str
to to_string
.
[breaking-change]
This commit is contained in:
parent
bfe4ddfdea
commit
12c334a77b
208 changed files with 1557 additions and 1390 deletions
|
@ -391,7 +391,7 @@ mod tests {
|
|||
set_stdout(box w);
|
||||
println!("hello!");
|
||||
});
|
||||
assert_eq!(r.read_to_str().unwrap(), "hello!\n".to_string());
|
||||
assert_eq!(r.read_to_string().unwrap(), "hello!\n".to_string());
|
||||
})
|
||||
|
||||
iotest!(fn capture_stderr() {
|
||||
|
@ -404,7 +404,7 @@ mod tests {
|
|||
::realstd::io::stdio::set_stderr(box w);
|
||||
fail!("my special message");
|
||||
});
|
||||
let s = r.read_to_str().unwrap();
|
||||
let s = r.read_to_string().unwrap();
|
||||
assert!(s.as_slice().contains("my special message"));
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue