mirror of
https://github.com/uutils/coreutils
synced 2024-12-16 16:22:40 +00:00
Merge pull request #422 from Arcterus/die-warnings-die
Get rid of warnings
This commit is contained in:
commit
3be4654e88
2 changed files with 6 additions and 4 deletions
|
@ -213,9 +213,9 @@ fn hashsum(algoname: &str, mut digest: Box<Digest>, files: Vec<String>, 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<Digest>, files: Vec<String>, 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);
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue