Fix confusing doc of Vfs::add_path

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-12 17:13:48 +10:00
parent 24b1941c1a
commit 989be49cb0
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -14,8 +14,7 @@ impl Vfs {
Self(HashMap::with_capacity(16)) Self(HashMap::with_capacity(16))
} }
/// * `path` - must be canonical, must not be empty and must /// * `path` - must be canonical, must not be empty.
/// start with a prefix.
pub(super) fn add_path(&mut self, mut path: &Path) { pub(super) fn add_path(&mut self, mut path: &Path) {
while let Some(parent) = path.parent() { while let Some(parent) = path.parent() {
if let Some(path_str) = path.to_str() { if let Some(path_str) = path.to_str() {