about summary refs log tree commit diff
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2012-10-18 11:04:59 -0700
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2012-10-18 11:04:59 -0700
commitfe41ccec6440b6ae64cae26da8e9bc42e1b06a9f (patch)
tree038b3992d5ffba228128b9c5a1db9dfeddfb6887
parentac50046a111a1ef6fb58b7e5f368ff6b9b55f89c (diff)
downloadrust-fe41ccec6440b6ae64cae26da8e9bc42e1b06a9f.tar.gz
rust-fe41ccec6440b6ae64cae26da8e9bc42e1b06a9f.zip
Rename str::to_unique to str::to_owned.
-rw-r--r--src/libcore/extfmt.rs4
-rw-r--r--src/libcore/option.rs2
-rw-r--r--src/libcore/str.rs4
-rw-r--r--src/libstd/json.rs2
4 files changed, 6 insertions, 6 deletions
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<T>(opt: &mut Option<T>) -> T {
 
 pub pure fn unwrap_expect<T>(opt: Option<T>, 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);