about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-07-18 03:46:23 +0000
committerbors <bors@rust-lang.org>2014-07-18 03:46:23 +0000
commit8a308b167f3a7feea3f1cd4b3be0a5048872e041 (patch)
tree615c76b7713cf1fc1b75d993a27b7843db3d57e8 /src/test
parentcebed8ab921e7e5f539236ae7ef87ee1992eaaaf (diff)
parent8107ef77f0647158e693c22bbee1a2f71a0c4e37 (diff)
downloadrust-8a308b167f3a7feea3f1cd4b3be0a5048872e041.tar.gz
rust-8a308b167f3a7feea3f1cd4b3be0a5048872e041.zip
auto merge of #15725 : aochagavia/rust/vec, r=alexcrichton
* Deprecated `to_owned` in favor of `to_vec`
* Deprecated `into_owned` in favor of `into_vec`

[breaking-change]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs4
-rw-r--r--src/test/bench/shootout-regex-dna.rs2
-rw-r--r--src/test/run-pass/issue-1696.rs2
-rw-r--r--src/test/run-pass/issue-4241.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index b3deb88543e..143175e558b 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -72,7 +72,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , uint>, total: uint) -> String {
 
 // given a map, search for the frequency of a pattern
 fn find(mm: &HashMap<Vec<u8> , uint>, key: String) -> uint {
-   let key = key.to_owned().into_ascii().as_slice().to_lower().into_string();
+   let key = key.into_ascii().as_slice().to_lower().into_string();
    match mm.find_equiv(&key.as_bytes()) {
       option::None      => { return 0u; }
       option::Some(&num) => { return num; }
@@ -179,7 +179,7 @@ fn main() {
    let mut proc_mode = false;
 
    for line in rdr.lines() {
-       let line = line.unwrap().as_slice().trim().to_owned();
+       let line = line.unwrap().as_slice().trim().to_string();
 
        if line.len() == 0u { continue; }
 
diff --git a/src/test/bench/shootout-regex-dna.rs b/src/test/bench/shootout-regex-dna.rs
index bdf6862d0b1..8908b5b87ed 100644
--- a/src/test/bench/shootout-regex-dna.rs
+++ b/src/test/bench/shootout-regex-dna.rs
@@ -109,7 +109,7 @@ fn main() {
     let (mut variant_strs, mut counts) = (vec!(), vec!());
     for variant in variants.move_iter() {
         let seq_arc_copy = seq_arc.clone();
-        variant_strs.push(variant.to_string().to_owned());
+        variant_strs.push(variant.to_string());
         counts.push(Future::spawn(proc() {
             count_matches(seq_arc_copy.as_slice(), &variant)
         }));
diff --git a/src/test/run-pass/issue-1696.rs b/src/test/run-pass/issue-1696.rs
index c05e84b6e69..291fab29584 100644
--- a/src/test/run-pass/issue-1696.rs
+++ b/src/test/run-pass/issue-1696.rs
@@ -15,6 +15,6 @@ use std::collections::HashMap;
 
 pub fn main() {
     let mut m = HashMap::new();
-    m.insert("foo".as_bytes().to_owned(), "bar".as_bytes().to_owned());
+    m.insert(b"foo".to_vec(), b"bar".to_vec());
     println!("{:?}", m);
 }
diff --git a/src/test/run-pass/issue-4241.rs b/src/test/run-pass/issue-4241.rs
index 3ebc3e64573..15423121fda 100644
--- a/src/test/run-pass/issue-4241.rs
+++ b/src/test/run-pass/issue-4241.rs
@@ -56,7 +56,7 @@ priv fn parse_list(len: uint, io: @io::Reader) -> Result {
 }
 
 priv fn chop(s: String) -> String {
-  s.slice(0, s.len() - 1).to_owned()
+  s.slice(0, s.len() - 1).to_string()
 }
 
 priv fn parse_bulk(io: @io::Reader) -> Result {