diff options
Diffstat (limited to 'support/pkgcheck/src/recode.rs')
-rw-r--r-- | support/pkgcheck/src/recode.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/support/pkgcheck/src/recode.rs b/support/pkgcheck/src/recode.rs index efb8b932b6..827da9587b 100644 --- a/support/pkgcheck/src/recode.rs +++ b/support/pkgcheck/src/recode.rs @@ -64,9 +64,7 @@ pub fn wrong_line_endings2crlf(fname: &str) -> Result<(), io::Error> { let mut buffer: Vec<u8> = Vec::new(); // read the whole file - if let Err(e) = hdl_in.read_to_end(&mut buffer) { - return Err(e); - }; + hdl_in.read_to_end(&mut buffer)?; let another_vec: Vec<u8> = fix_line_endings2crlf(&buffer); @@ -94,9 +92,7 @@ pub fn wrong_line_endings2lf(fname: &str) -> Result<(), io::Error> { let mut buffer: Vec<u8> = Vec::new(); // read the whole file - if let Err(e) = hdl_in.read_to_end(&mut buffer) { - return Err(e); - }; + hdl_in.read_to_end(&mut buffer)?; let another_vec: Vec<u8> = fix_line_endings2lf(&buffer); |