]> git.lizzy.rs Git - rust.git/blobdiff - src/test/bench/shootout-k-nucleotide-pipes.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / bench / shootout-k-nucleotide-pipes.rs
index 195c146c12fe719f26927bef8016837b91852345..f4d1cee5fb4ca11434a1378e3e555e334aeaf161 100644 (file)
@@ -64,7 +64,7 @@ fn sortKV(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
                                k.as_slice()
                                .to_ascii()
                                .to_upper()
-                               .into_str(), v).as_slice());
+                               .into_string(), v).as_slice());
    }
 
    return buffer
@@ -72,7 +72,7 @@ fn sortKV(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
 
 // 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_str();
+   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; }
@@ -157,7 +157,7 @@ fn main() {
     let sizes = vec!(1u,2,3,4,6,12,18);
     let mut streams = Vec::from_fn(sizes.len(), |_| Some(channel::<String>()));
     let mut from_child = Vec::new();
-    let to_child  = sizes.iter().zip(streams.mut_iter()).map(|(sz, stream_ref)| {
+    let to_child  = sizes.iter().zip(streams.iter_mut()).map(|(sz, stream_ref)| {
         let sz = *sz;
         let stream = replace(stream_ref, None);
         let (to_parent_, from_child_) = stream.unwrap();
@@ -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; }