diff options
| author | Richo Healey <richo@psych0tik.net> | 2014-04-15 18:17:48 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-04-18 17:25:34 -0700 |
| commit | 919889a1d688a6bbe2edac8705f048f06b1b455c (patch) | |
| tree | 322a69fa39bdaf37bbfffc84020acbd4c87871d0 /src/libstd/task.rs | |
| parent | b75683cadf6c4c55360202cd6a0106be80532451 (diff) | |
| download | rust-919889a1d688a6bbe2edac8705f048f06b1b455c.tar.gz rust-919889a1d688a6bbe2edac8705f048f06b1b455c.zip | |
Replace all ~"" with "".to_owned()
Diffstat (limited to 'src/libstd/task.rs')
| -rw-r--r-- | src/libstd/task.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs index df627809ea0..610df320fa5 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -48,6 +48,7 @@ use str::{Str, SendStr, IntoMaybeOwned}; #[cfg(test)] use any::{AnyOwnExt, AnyRefExt}; #[cfg(test)] use result; +#[cfg(test)] use str::StrSlice; /// Indicates the manner in which a task exited. /// @@ -297,7 +298,7 @@ fn test_unnamed_task() { #[test] fn test_owned_named_task() { - task().named(~"ada lovelace").spawn(proc() { + task().named("ada lovelace".to_owned()).spawn(proc() { with_task_name(|name| { assert!(name.unwrap() == "ada lovelace"); }) @@ -369,7 +370,7 @@ fn test_back_to_the_future_result() { #[test] fn test_try_success() { match try(proc() { - ~"Success!" + "Success!".to_owned() }).as_ref().map(|s| s.as_slice()) { result::Ok("Success!") => (), _ => fail!() @@ -499,12 +500,12 @@ fn test_try_fail_message_static_str() { #[test] fn test_try_fail_message_owned_str() { match try(proc() { - fail!(~"owned string"); + fail!("owned string".to_owned()); }) { Err(e) => { type T = ~str; assert!(e.is::<T>()); - assert_eq!(*e.move::<T>().unwrap(), ~"owned string"); + assert_eq!(*e.move::<T>().unwrap(), "owned string".to_owned()); } Ok(()) => fail!() } |
