about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2015-04-21 21:27:29 -0700
committerTamir Duberstein <tamird@gmail.com>2015-04-28 17:49:22 -0700
commit41ff911ae8eed8c48df1f50a69e9d3fca5d52bd6 (patch)
tree23baf8fdade1c302fa64e8337ff754db2c183f86
parent8871c17b76a1e0ab36ce2bb51008b53f596e5b3c (diff)
downloadrust-41ff911ae8eed8c48df1f50a69e9d3fca5d52bd6.tar.gz
rust-41ff911ae8eed8c48df1f50a69e9d3fca5d52bd6.zip
#10393 & #13206: Warnings
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs6
-rw-r--r--src/test/bench/shootout-reverse-complement.rs2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index b777b25243b..d65a22ba2a4 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -13,8 +13,6 @@
 
 // multi tasking k-nucleotide
 
-#![allow(bad_style)]
-
 use std::ascii::AsciiExt;
 use std::cmp::Ordering::{self, Less, Greater, Equal};
 use std::collections::HashMap;
@@ -47,7 +45,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
    }
 
    // sort by key, then by value
-   fn sortKV(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
+   fn sort_kv(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
         orig.sort_by(|&(ref a, _), &(ref b, _)| a.cmp(b));
         orig.sort_by(|&(_, a), &(_, b)| f64_cmp(b, a));
         orig
@@ -60,7 +58,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
       pairs.push(((*key).clone(), pct(val, total)));
    }
 
-   let pairs_sorted = sortKV(pairs);
+   let pairs_sorted = sort_kv(pairs);
 
    let mut buffer = String::new();
    for &(ref k, v) in &pairs_sorted {
diff --git a/src/test/bench/shootout-reverse-complement.rs b/src/test/bench/shootout-reverse-complement.rs
index 55b2b1e2e32..64b0f91f4dc 100644
--- a/src/test/bench/shootout-reverse-complement.rs
+++ b/src/test/bench/shootout-reverse-complement.rs
@@ -205,7 +205,7 @@ fn parallel<I: Iterator, F>(iter: I, ref f: F)
 
 fn main() {
     let mut data = Vec::with_capacity(1024 * 1024);
-    io::stdin().read_to_end(&mut data);
+    io::stdin().read_to_end(&mut data).unwrap();
     let tables = &Tables::new();
     parallel(mut_dna_seqs(&mut data), |seq| reverse_complement(seq, tables));
     io::stdout().write_all(&data).unwrap();