We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9e9279 commit 1b9733aCopy full SHA for 1b9733a
src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -13,8 +13,6 @@
13
14
// multi tasking k-nucleotide
15
16
-#![allow(bad_style)]
17
-
18
use std::ascii::AsciiExt;
19
use std::cmp::Ordering::{self, Less, Greater, Equal};
20
use std::collections::HashMap;
@@ -47,7 +45,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
47
45
}
48
46
49
// sort by key, then by value
50
- 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)> {
51
orig.sort_by(|&(ref a, _), &(ref b, _)| a.cmp(b));
52
orig.sort_by(|&(_, a), &(_, b)| f64_cmp(b, a));
53
orig
@@ -60,7 +58,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
60
58
pairs.push(((*key).clone(), pct(val, total)));
61
59
62
63
- let pairs_sorted = sortKV(pairs);
+ let pairs_sorted = sort_kv(pairs);
64
65
let mut buffer = String::new();
66
for &(ref k, v) in &pairs_sorted {
src/test/bench/shootout-reverse-complement.rs
@@ -205,7 +205,7 @@ fn parallel<I: Iterator, F>(iter: I, ref f: F)
205
206
fn main() {
207
let mut data = Vec::with_capacity(1024 * 1024);
208
- io::stdin().read_to_end(&mut data);
+ io::stdin().read_to_end(&mut data).unwrap();
209
let tables = &Tables::new();
210
parallel(mut_dna_seqs(&mut data), |seq| reverse_complement(seq, tables));
211
io::stdout().write_all(&data).unwrap();
0 commit comments