about summary refs log tree commit diff
path: root/src/libstd/time.rs
diff options
context:
space:
mode:
authorYoungsoo Son <ysoo.son@samsung.com>2013-05-10 20:08:56 +0900
committerYoungsoo Son <ysoo.son@samsung.com>2013-05-10 20:08:56 +0900
commit24ef88cee96de837370ec370ed4d1f3aa3530a20 (patch)
tree931a1c73110fa3316d51f19f618dc07167d67ea8 /src/libstd/time.rs
parentb7da97504943c79185548881aab88d6a0e2118fd (diff)
downloadrust-24ef88cee96de837370ec370ed4d1f3aa3530a20.tar.gz
rust-24ef88cee96de837370ec370ed4d1f3aa3530a20.zip
renamed str::from_slice to str::to_owned
Diffstat (limited to 'src/libstd/time.rs')
-rw-r--r--src/libstd/time.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 31d8eb20a67..e731f679221 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -289,7 +289,7 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
 
         let mut i = 0u;
         while i < digits {
-            let range = str::char_range_at(str::from_slice(ss), pos);
+            let range = str::char_range_at(str::to_owned(ss), pos);
             pos = range.next;
 
             match range.ch {
@@ -628,7 +628,7 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
         }
     }
 
-    do io::with_str_reader(str::from_slice(format)) |rdr| {
+    do io::with_str_reader(str::to_owned(format)) |rdr| {
         let mut tm = Tm {
             tm_sec: 0_i32,
             tm_min: 0_i32,
@@ -840,7 +840,7 @@ priv fn do_strftime(format: &str, tm: &Tm) -> ~str {
 
     let mut buf = ~"";
 
-    do io::with_str_reader(str::from_slice(format)) |rdr| {
+    do io::with_str_reader(str::to_owned(format)) |rdr| {
         while !rdr.eof() {
             match rdr.read_char() {
                 '%' => buf += parse_type(rdr.read_char(), tm),
@@ -1022,7 +1022,7 @@ mod tests {
 
         fn test(s: &str, format: &str) -> bool {
             match strptime(s, format) {
-              Ok(ref tm) => tm.strftime(format) == str::from_slice(s),
+              Ok(ref tm) => tm.strftime(format) == str::to_owned(s),
               Err(copy e) => fail!(e)
             }
         }