diff --git a/pbs-tape/src/sg_tape/mam.rs b/pbs-tape/src/sg_tape/mam.rs index 5b7605d0..f8afbe7b 100644 --- a/pbs-tape/src/sg_tape/mam.rs +++ b/pbs-tape/src/sg_tape/mam.rs @@ -257,7 +257,7 @@ fn decode_mam_attributes(data: &[u8]) -> Result, Error> { format!("{}", u64::from_be_bytes(data[0..8].try_into()?)) } } else { - unreachable!(); + bail!("unexpected MAM attribute length {}", info.1); } } MamFormat::BINARY => hex::encode(&data),