From 053bad9a2545d2289a2b2022c5638a5dba0a56bc Mon Sep 17 00:00:00 2001 From: Arcterus Date: Sun, 19 Oct 2014 11:54:17 -0700 Subject: [PATCH] Get rid of warnings --- src/hashsum/hashsum.rs | 6 +++--- src/sort/sort.rs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hashsum/hashsum.rs b/src/hashsum/hashsum.rs index 6f7969aa7..b8f41987e 100644 --- a/src/hashsum/hashsum.rs +++ b/src/hashsum/hashsum.rs @@ -213,9 +213,9 @@ fn hashsum(algoname: &str, mut digest: Box, files: Vec, binary: for (i, line) in buffer.lines().enumerate() { let line = safe_unwrap!(line); let (ck_filename, sum, binary_check) = match gnu_re.captures(line.as_slice()) { - Some(caps) => (caps.name("fileName"), caps.name("digest").to_ascii().to_lower(), caps.name("binary") == "*"), + Some(caps) => (caps.name("fileName"), caps.name("digest").to_ascii().to_lowercase(), caps.name("binary") == "*"), None => match bsd_re.captures(line.as_slice()) { - Some(caps) => (caps.name("fileName"), caps.name("digest").to_ascii().to_lower(), true), + Some(caps) => (caps.name("fileName"), caps.name("digest").to_ascii().to_lowercase(), true), None => { bad_format += 1; if strict { @@ -229,7 +229,7 @@ fn hashsum(algoname: &str, mut digest: Box, files: Vec, binary: } }; let real_sum = safe_unwrap!(digest_reader(&mut digest, &mut safe_unwrap!(File::open(&Path::new(ck_filename))), binary_check)) - .as_slice().to_ascii().to_lower(); + .as_slice().to_ascii().to_lowercase(); if sum.as_slice() == real_sum.as_slice() { if !quiet { pipe_println!("{}: OK", ck_filename); diff --git a/src/sort/sort.rs b/src/sort/sort.rs index 69df313e3..0836ce032 100644 --- a/src/sort/sort.rs +++ b/src/sort/sort.rs @@ -10,10 +10,12 @@ * file that was distributed with this source code. */ +#![allow(dead_code)] + extern crate getopts; use std::io::{print, File, BufferedReader}; -use std::io::stdio::{stdin_raw, stderr}; +use std::io::stdio::stdin_raw; use std::str::Chars; #[path = "../common/util.rs"]