diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index 5acb45fdf1a..d41393c2393 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -329,11 +329,11 @@ pub mod rt { // For strings, precision is the maximum characters // displayed let mut unpadded = match cv.precision { - CountImplied => s.to_unique(), + CountImplied => s.to_owned(), CountIs(max) => if max as uint < str::char_len(s) { str::substr(s, 0u, max as uint) } else { - s.to_unique() + s.to_owned() } }; return unsafe { pad(cv, move unpadded, PadNozero) }; diff --git a/src/libcore/option.rs b/src/libcore/option.rs index f8bafe29fdd..50489a82029 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -225,7 +225,7 @@ pub fn swap_unwrap(opt: &mut Option) -> T { pub pure fn unwrap_expect(opt: Option, reason: &str) -> T { //! As unwrap, but with a specified failure message. - if opt.is_none() { fail reason.to_unique(); } + if opt.is_none() { fail reason.to_owned(); } unwrap(move opt) } diff --git a/src/libcore/str.rs b/src/libcore/str.rs index d32d35cbe1a..3122f3d7f32 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -2135,7 +2135,7 @@ pub trait StrSlice { pure fn trim() -> ~str; pure fn trim_left() -> ~str; pure fn trim_right() -> ~str; - pure fn to_unique() -> ~str; + pure fn to_owned() -> ~str; pure fn to_managed() -> @str; pure fn char_at(i: uint) -> char; } @@ -2258,7 +2258,7 @@ impl &str: StrSlice { pure fn trim_right() -> ~str { trim_right(self) } #[inline] - pure fn to_unique() -> ~str { self.slice(0, self.len()) } + pure fn to_owned() -> ~str { self.slice(0, self.len()) } #[inline] pure fn to_managed() -> @str { diff --git a/src/libstd/json.rs b/src/libstd/json.rs index d170255b565..5f64389e583 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -897,7 +897,7 @@ pub impl Deserializer: serialization::Deserializer { // FIXME(#3148) This hint should not be necessary. let obj: &self/~Object = obj; - match obj.find_ref(&name.to_unique()) { + match obj.find_ref(&name.to_owned()) { None => fail fmt!("no such field: %s", name), Some(json) => { self.stack.push(json);