Skip to content

Commit

Permalink
Remove banned questionmark
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Dec 13, 2024
1 parent 1861dc9 commit a5e7af5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions minijinja/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,8 @@ mod builtins {
));
}

let by_value = matches!(kwargs.get("by")?, Some("value"));
let case_sensitive = kwargs
.get::<Option<bool>>("case_sensitive")?
.unwrap_or(false);
let by_value = matches!(ok!(kwargs.get("by")), Some("value"));
let case_sensitive = ok!(kwargs.get::<Option<bool>>("case_sensitive")).unwrap_or(false);
let mut rv: Vec<_> = ok!(v.try_iter())
.map(|key| (key.clone(), v.get_item(&key).unwrap_or(Value::UNDEFINED)))
.collect();
Expand Down

0 comments on commit a5e7af5

Please sign in to comment.