Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklan committed Sep 27, 2022
1 parent 491a183 commit 67d70b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/completer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ impl ClickHelper {

#[allow(clippy::borrowed_box)]
fn get_exact_command(&self, line: &str) -> Option<&Box<dyn Cmd>> {
for cmd in self.commands.iter() {
if cmd.is(line) {
return Some(cmd);
}
}
None
self.commands.iter().find(|&cmd| cmd.is(line))
}

/// complete a line that starts with a full command. This should only be called when we know
Expand Down
2 changes: 1 addition & 1 deletion src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ pub fn raw_quantity(quantity: &Quantity) -> f64 {

if suffix.len() > 1 && (suffix.starts_with('e') || suffix.starts_with('E')) {
// our suffix has more than one char and starts with e/E, so it should be a decimal exponent
match (&suffix[1..]).parse::<u32>() {
match (suffix[1..]).parse::<u32>() {
Ok(exp) => {
let famt = (amt * base10.pow(exp)) as f64;
if has_neg {
Expand Down

0 comments on commit 67d70b6

Please sign in to comment.