fix: remove unneeded mut in render_directory

This commit is contained in:
Joonas Koivunen 2020-08-05 13:30:26 +03:00
parent de9247574d
commit 31e2a5ee5a

View File

@ -355,7 +355,7 @@ impl std::error::Error for TreeConstructionFailed {}
impl<'a> PostOrderIterator<'a> {
fn render_directory(
links: &mut BTreeMap<String, Leaf>,
links: &BTreeMap<String, Leaf>,
buffer: &mut Vec<u8>,
) -> Result<Leaf, TreeConstructionFailed> {
use crate::pb::{FlatUnixFs, PBLink, UnixFs, UnixFsType};
@ -488,7 +488,7 @@ impl<'a> PostOrderIterator<'a> {
let buffer = &mut self.block_buffer;
buffer.clear();
let leaf = match Self::render_directory(&mut collected, buffer) {
let leaf = match Self::render_directory(&collected, buffer) {
Ok(leaf) => leaf,
Err(e) => return Some(Err(e)),
};