1
0
mirror of https://github.com/uutils/coreutils synced 2024-07-05 17:08:59 +00:00

cksum/hashsum: Move the algo mgmt into a dedicated function

This commit is contained in:
Sylvestre Ledru 2024-06-04 19:13:54 +02:00
parent e7898ab32a
commit c2292a8da6

View File

@ -396,6 +396,7 @@ fn get_file_to_check(
}
}
/// Returns a reader to the list of checksums
fn get_input_file(filename_input: &OsStr, input_is_stdin: bool) -> UResult<Box<dyn Read>> {
if input_is_stdin {
Ok(Box::new(stdin())) // Use stdin if "-" is specified