mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
md5sum: remove unnecessary variable (thanks @huonw)
This commit is contained in:
parent
2e124cc778
commit
1c47132bc2
1 changed files with 2 additions and 3 deletions
|
@ -127,8 +127,7 @@ fn calc_sum(md5: &mut crypto::md5::Md5, file: &mut File, binary: bool) -> ~str {
|
|||
if binary {
|
||||
safe_unwrap!(file.read_to_end())
|
||||
} else {
|
||||
let val = safe_unwrap!(file.read_to_str()).into_bytes(); // XXX: i don't know why the variable is necessary
|
||||
val
|
||||
(safe_unwrap!(file.read_to_str())).into_bytes()
|
||||
};
|
||||
md5.reset();
|
||||
md5.input(data);
|
||||
|
@ -155,4 +154,4 @@ fn from_bsd<'a>(line: &'a str, bytes: uint) -> Option<(&'a str, &'a str)> {
|
|||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue