Skip to content

Commit d578728

Browse files
committed
Clippy
1 parent e212359 commit d578728

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/app.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,16 @@ impl Tile {
265265

266266
self.handle_search_query_changed();
267267

268-
if self.results.is_empty() {
269-
if let Some(res) = Expression::from_str(&self.query) {
270-
self.results.push(App {
271-
open_command: Function::Calculate(res),
272-
desc: RUSTCAST_DESC_NAME.to_string(),
273-
icons: None,
274-
name: res.eval().to_string(),
275-
name_lc: "".to_string(),
276-
});
277-
}
268+
if self.results.is_empty()
269+
&& let Some(res) = Expression::from_str(&self.query)
270+
{
271+
self.results.push(App {
272+
open_command: Function::Calculate(res),
273+
desc: RUSTCAST_DESC_NAME.to_string(),
274+
icons: None,
275+
name: res.eval().to_string(),
276+
name_lc: "".to_string(),
277+
});
278278
}
279279
let new_length = self.results.len();
280280

src/calculator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl Expression {
2626
}
2727

2828
pub fn from_str(s: &str) -> Option<Expression> {
29-
parse_expression(&s)
29+
parse_expression(s)
3030
}
3131
}
3232

0 commit comments

Comments
 (0)