Skip to content

Commit

Permalink
Use ReadDir in the Box
Browse files Browse the repository at this point in the history
  • Loading branch information
szeweq committed May 30, 2024
1 parent d1a8ded commit d166da0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib-core/src/entry/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl EntrySaverSpec for FSEntrySaver {

struct RecursiveReadDir {
dirs: Vec<Box<Path>>,
cur: Option<fs::ReadDir>
cur: Option<Box<fs::ReadDir>>
}
impl RecursiveReadDir {
fn new(src_dir: Box<Path>) -> Self {
Expand All @@ -96,7 +96,7 @@ impl Iterator for RecursiveReadDir {
let p = self.dirs.pop()?;
match fs::read_dir(p) {
Ok(rd) => {
self.cur = Some(rd);
self.cur = Some(Box::new(rd));
self.cur.as_mut().unwrap()
},
Err(e) => return Some(Err(e))
Expand Down

0 comments on commit d166da0

Please sign in to comment.