Skip to content

Commit 2249944

Browse files
committed
fix some clippy warnings
1 parent dd319d6 commit 2249944

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/firehose/blocks.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ fn parse_car(car_bytes: &[u8]) -> anyhow::Result<Vec<Record>> {
5454
// encode the raw CID bytes as a base32 link string
5555
//let cid = cid_to_link(cid_bytes);
5656

57-
match ciborium::from_reader::<Record, _>(&mut Cursor::new(cbor)) {
58-
Ok(record) => records.push(record),
59-
Err(_) => {} // not a record block (e.g. CAR root node), skip
57+
if let Ok(record) = ciborium::from_reader::<Record, _>(&mut Cursor::new(cbor)) {
58+
records.push(record);
6059
}
6160

6261
cursor.set_position(end as u64);

0 commit comments

Comments
 (0)