From 77960a92ae8aabeae4e957b7a1d86fe550d287a9 Mon Sep 17 00:00:00 2001 From: bryan newbold Date: Sun, 20 Aug 2023 17:18:09 -0700 Subject: cargo clippy clean (rust v1.70) --- adenosine/src/car.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'adenosine/src/car.rs') diff --git a/adenosine/src/car.rs b/adenosine/src/car.rs index 67c97e9..e425f7e 100644 --- a/adenosine/src/car.rs +++ b/adenosine/src/car.rs @@ -92,12 +92,10 @@ async fn inner_car_bytes_reader( let mut car_writer = CarWriter::new(car_header, buf); let cid_list = db.get_descendants::>(root)?; - for cid in cid_list { + // TODO: only load the first root CID from list; sometimes others are missing. should handle this better + if let Some(cid) = cid_list.into_iter().next() { let block = db.get_block(&cid)?.expect("block content"); car_writer.write(cid, block).await?; - // TODO: only load the first root CID from list; sometimes others are missing. should - // handle this better - break; } Ok(car_writer.finish().await?) } -- cgit v1.2.3