mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
md5sum: remove unnecessary variable (thanks @huonw)
This commit is contained in:
+2
-3
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user