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 <noreply@anthropic.com>
This commit is contained in:
parent
621daaae9b
commit
2d65785790
1 changed files with 4 additions and 1 deletions
|
|
@ -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:#}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue