From 2d65785790aea7375524418375f7ad2cf3c5942e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 8 Sep 2026 14:07:51 +0200 Subject: [PATCH] Fix build: ControlSnapshot has no Debug, expect_err needs it Result::expect_err requires the Ok variant to implement Debug for its panic message. ControlSnapshot intentionally does not derive Debug; match on the Result instead. Co-Authored-By: Claude Opus 5 --- src/control_plane.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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:#}"