refactor: remove indentation level
@@ -93,7 +93,9 @@ impl FileAdder {
}
fn flush_buffered_leaf(&mut self) -> Option<(Cid, Vec<u8>)> {
- if !self.block_buffer.is_empty() {
+ if self.block_buffer.is_empty() {
+ return None;
+ }
let bytes = self.block_buffer.len();
let inner = FlatUnixFs {
@@ -121,9 +123,6 @@ impl FileAdder {
self.unflushed_links[0].push((cid.clone(), total_size as u64, bytes as u64));
Some((cid, vec))
- } else {
- None
- }
}
// FIXME: collapse the min_links and all into single type to avoid boolean args
