fix: remove unneeded mut in render_directory
This commit is contained in:
parent
de9247574d
commit
31e2a5ee5a
@ -355,7 +355,7 @@ impl std::error::Error for TreeConstructionFailed {}
|
|||||||
|
|
||||||
impl<'a> PostOrderIterator<'a> {
|
impl<'a> PostOrderIterator<'a> {
|
||||||
fn render_directory(
|
fn render_directory(
|
||||||
links: &mut BTreeMap<String, Leaf>,
|
links: &BTreeMap<String, Leaf>,
|
||||||
buffer: &mut Vec<u8>,
|
buffer: &mut Vec<u8>,
|
||||||
) -> Result<Leaf, TreeConstructionFailed> {
|
) -> Result<Leaf, TreeConstructionFailed> {
|
||||||
use crate::pb::{FlatUnixFs, PBLink, UnixFs, UnixFsType};
|
use crate::pb::{FlatUnixFs, PBLink, UnixFs, UnixFsType};
|
||||||
@ -488,7 +488,7 @@ impl<'a> PostOrderIterator<'a> {
|
|||||||
let buffer = &mut self.block_buffer;
|
let buffer = &mut self.block_buffer;
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
|
|
||||||
let leaf = match Self::render_directory(&mut collected, buffer) {
|
let leaf = match Self::render_directory(&collected, buffer) {
|
||||||
Ok(leaf) => leaf,
|
Ok(leaf) => leaf,
|
||||||
Err(e) => return Some(Err(e)),
|
Err(e) => return Some(Err(e)),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user