Skip to content

Commit fc1fade

Browse files
committed
Make clippy happy
1 parent 0f22300 commit fc1fade

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

crates/hexora/src/audit/annotate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn annotate_result(
9292
])
9393
.with_note({
9494
let mut note = String::new();
95-
note.push_str(format!("Confidence: {:?}\n", &item.confidence).as_str());
95+
note.push_str(format!("Confidence: {:?}\n", item.confidence).as_str());
9696
note.push_str(
9797
format!("Machine learning based score for file: {:.2}\n", score).as_str(),
9898
);

crates/hexora/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ const CLI_START_ARG_STANDALONE: usize = 0;
55
fn main() {
66
run_cli(CLI_START_ARG_STANDALONE);
77
}
8+

crates/hexora_semantic/src/strings/resolver.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ impl<'a> NodeTransformer<'a> {
6969

7070
let mut resolved = String::new();
7171
for mapped in resolved_exprs.iter() {
72-
if let Some(s) = self.extract_string(mapped) {
72+
{
73+
let s = self.extract_string(mapped)?;
7374
resolved.push_str(&s);
74-
} else {
75-
// N.B.: We currently abort if any part cannot be resolved to a string.
76-
return None;
7775
}
7876
}
7977
Some(resolved)
@@ -119,10 +117,9 @@ impl<'a> NodeTransformer<'a> {
119117
}
120118

121119
if let ast::Expr::Call(inner_call) = expr {
122-
if let Some(arg) = self.call_is_simple_reversed(inner_call) {
120+
{
121+
let arg = self.call_is_simple_reversed(inner_call)?;
123122
return self.sequence_to_parts(arg, !reverse);
124-
} else {
125-
return None;
126123
}
127124
}
128125

0 commit comments

Comments
 (0)