(&mut self, directory: &Path)
| 73 | } |
| 74 | |
| 75 | fn listing(&mut self, directory: &Path) -> io::Result<Option<&DirectoryListing>> { |
| 76 | let listing = match self.listings.entry(directory.to_path_buf()) { |
| 77 | Entry::Occupied(occupied) => occupied.into_mut(), |
| 78 | Entry::Vacant(vacant) => vacant.insert(list_real_directory(directory)?), |
| 79 | }; |
| 80 | Ok(listing.as_ref()) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | /// The entries of one real directory. |
no test coverage detected