We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37ead6e commit 824271fCopy full SHA for 824271f
src/lib.rs
@@ -547,8 +547,6 @@ impl QueueFile {
547
let elem = elem.as_ref();
548
let len = elem.len();
549
550
- ensure!(i32::try_from(len).is_ok(), ElementTooBigSnafu {});
551
-
552
if first_added.is_none() {
553
first_added = Some(Element::new(pos, len)?);
554
}
@@ -1194,9 +1192,7 @@ impl Element {
1194
1192
ensure!(i64::try_from(pos).is_ok(), CorruptedFileSnafu {
1195
1193
msg: "element position must be less or equal to i64::MAX"
1196
});
1197
- ensure!(i32::try_from(len).is_ok(), CorruptedFileSnafu {
1198
- msg: "element length must be less or equal to i32::MAX"
1199
- });
+ ensure!(i32::try_from(len).is_ok(), ElementTooBigSnafu);
1200
1201
Ok(Self { pos, len })
1202
0 commit comments