Skip to content

Commit 1b9733a

Browse files
committed
1 parent e9e9279 commit 1b9733a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/test/bench/shootout-k-nucleotide-pipes.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
// multi tasking k-nucleotide
1515

16-
#![allow(bad_style)]
17-
1816
use std::ascii::AsciiExt;
1917
use std::cmp::Ordering::{self, Less, Greater, Equal};
2018
use std::collections::HashMap;
@@ -47,7 +45,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
4745
}
4846

4947
// sort by key, then by value
50-
fn sortKV(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
48+
fn sort_kv(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
5149
orig.sort_by(|&(ref a, _), &(ref b, _)| a.cmp(b));
5250
orig.sort_by(|&(_, a), &(_, b)| f64_cmp(b, a));
5351
orig
@@ -60,7 +58,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
6058
pairs.push(((*key).clone(), pct(val, total)));
6159
}
6260

63-
let pairs_sorted = sortKV(pairs);
61+
let pairs_sorted = sort_kv(pairs);
6462

6563
let mut buffer = String::new();
6664
for &(ref k, v) in &pairs_sorted {

src/test/bench/shootout-reverse-complement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fn parallel<I: Iterator, F>(iter: I, ref f: F)
205205

206206
fn main() {
207207
let mut data = Vec::with_capacity(1024 * 1024);
208-
io::stdin().read_to_end(&mut data);
208+
io::stdin().read_to_end(&mut data).unwrap();
209209
let tables = &Tables::new();
210210
parallel(mut_dna_seqs(&mut data), |seq| reverse_complement(seq, tables));
211211
io::stdout().write_all(&data).unwrap();

0 commit comments

Comments
 (0)