tools/fs: add file_name_utf8_unchecked shortcut
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
806d7a6a35
commit
32286b039c
@ -66,6 +66,10 @@ impl ReadDirEntry {
|
|||||||
pub fn parent_fd(&self) -> RawFd {
|
pub fn parent_fd(&self) -> RawFd {
|
||||||
self.parent_fd
|
self.parent_fd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub unsafe fn file_name_utf8_unchecked(&self) -> &str {
|
||||||
|
std::str::from_utf8_unchecked(self.file_name().to_bytes())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since Tied<T, U> implements Deref to U, a Tied<Dir, Iterator> already implements Iterator.
|
// Since Tied<T, U> implements Deref to U, a Tied<Dir, Iterator> already implements Iterator.
|
||||||
|
Loading…
Reference in New Issue
Block a user