diff --git a/src/control_plane.rs b/src/control_plane.rs index 7230532..3e35f93 100644 --- a/src/control_plane.rs +++ b/src/control_plane.rs @@ -7394,7 +7394,10 @@ mod tests { }], )?); - let error = ControlSnapshot::read(&path).expect_err("foreign encoding must be refused"); + let error = match ControlSnapshot::read(&path) { + Ok(_) => panic!("foreign encoding must be refused"), + Err(error) => error, + }; assert!( format!("{error:#}").contains("noncanonical"), "unexpected error: {error:#}"