Skip to content

Commit

Permalink
Comply to new clippy complaint; adds back in empty lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
BriocheBerlin committed Nov 1, 2023
1 parent 5be81b3 commit b02da71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/argument_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn get_output_path(args: &[String]) -> crate::Result<&String> {
/// Get `search_paths`, specified by `-L`
pub fn get_search_paths(args: &[String]) -> Vec<PathBuf> {
args.windows(2)
.filter_map(|x| (x[0] == "-L").then(|| PathBuf::from(&x[1])))
.filter(|&x| (x[0] == "-L")).map(|x| PathBuf::from(&x[1]))
.inspect(|path| log::trace!("new search path: {}", path.display()))
.collect()
}
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,14 @@ fn perform_addition(line: &str) -> u64 {
}
None => (segment, None),
};

// Parse number
let (number, radix) = match number.strip_prefix("0x") {
Some(s) => (s, 16),
None => (number, 10),
};
let length = tryc!(u64::from_str_radix(number, radix));

// Handle unit
let multiplier = match unit {
Some('K') => 1024,
Expand Down

0 comments on commit b02da71

Please sign in to comment.