diff options
| author | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-16 22:37:28 +0200 |
|---|---|---|
| committer | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-17 16:35:48 +0200 |
| commit | 8107ef77f0647158e693c22bbee1a2f71a0c4e37 (patch) | |
| tree | f8817f12a4bc1503169b257be8dba1a4e698f4e9 /src/test | |
| parent | efbbb51ec0bfa371573bd4ae2c34b1ba69e11e11 (diff) | |
| download | rust-8107ef77f0647158e693c22bbee1a2f71a0c4e37.tar.gz rust-8107ef77f0647158e693c22bbee1a2f71a0c4e37.zip | |
Rename functions in the CloneableVector trait
* 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.rs | 4 | ||||
| -rw-r--r-- | src/test/bench/shootout-regex-dna.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-1696.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-4241.rs | 2 |
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 { |
