Skip to content

Commit fe1b27e

Browse files
committed
fix(hushd): satisfy clippy expect_fun_call in CUA policy test
1 parent 92d19a2 commit fe1b27e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/services/hushd/tests/cua_policy_events.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ fn cua_events_map_to_custom_guard_action() {
4949

5050
for (event_type, cua_action) in cases {
5151
let event = cua_event(event_type, base_cua_data(cua_action));
52-
let mapped = map_policy_event(&event).expect(&format!(
53-
"map_policy_event should succeed for {}",
54-
event_type
55-
));
52+
let mapped = map_policy_event(&event).unwrap_or_else(|_| {
53+
panic!("map_policy_event should succeed for {}", event_type)
54+
});
5655

5756
match &mapped.action {
5857
MappedGuardAction::Custom { custom_type, .. } => {

0 commit comments

Comments
 (0)