fix clippy warnings

This commit is contained in:
Jan Scheer 2021-06-09 15:56:29 +02:00
parent be8650278b
commit 1b824f4914
3 changed files with 3 additions and 3 deletions

View file

@ -113,7 +113,7 @@ pub fn parse_num(src: &str) -> Result<(usize, bool), ParseSizeError> {
return Err(ParseSizeError::ParseFailure(src.to_string()));
}
parse_size(&size_string).map(|n| (n, all_but_last))
parse_size(size_string).map(|n| (n, all_but_last))
}
#[cfg(test)]

View file

@ -278,7 +278,7 @@ struct ByteSplitter {
impl ByteSplitter {
fn new(settings: &Settings) -> ByteSplitter {
let size_string = &settings.strategy_param;
let size_num = match parse_size(&size_string) {
let size_num = match parse_size(size_string) {
Ok(n) => n,
Err(e) => crash!(1, "invalid number of bytes: {}", e.to_string()),
};

View file

@ -419,5 +419,5 @@ fn parse_num(src: &str) -> Result<(usize, bool), ParseSizeError> {
return Err(ParseSizeError::ParseFailure(src.to_string()));
}
parse_size(&size_string).map(|n| (n, starting_with))
parse_size(size_string).map(|n| (n, starting_with))
}