mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-14 14:46:37 +00:00
Fix indentation of docs in extracted_files.rs
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
9c0726d197
commit
f3c04c8fed
1 changed files with 9 additions and 9 deletions
|
@ -80,17 +80,17 @@ impl ExtractedFiles {
|
|||
}
|
||||
|
||||
/// * `path` - must be a relative path without `.`, `..`, `/`, `prefix:/`
|
||||
/// and must not be empty, for these values it is guaranteed to
|
||||
/// return `None`.
|
||||
/// But could be set to "." for top-level.
|
||||
/// and must not be empty, for these values it is guaranteed to
|
||||
/// return `None`.
|
||||
/// But could be set to "." for top-level.
|
||||
pub fn get_entry(&self, path: &Path) -> Option<&ExtractedFilesEntry> {
|
||||
self.0.get(path)
|
||||
}
|
||||
|
||||
/// * `path` - must be a relative path without `.`, `..`, `/`, `prefix:/`
|
||||
/// and must not be empty, for these values it is guaranteed to
|
||||
/// return `None`.
|
||||
/// But could be set to "." for top-level.
|
||||
/// and must not be empty, for these values it is guaranteed to
|
||||
/// return `None`.
|
||||
/// But could be set to "." for top-level.
|
||||
pub fn get_dir(&self, path: &Path) -> Option<&HashSet<Box<OsStr>>> {
|
||||
match self.get_entry(path)? {
|
||||
ExtractedFilesEntry::Dir(file_names) => Some(file_names),
|
||||
|
@ -99,9 +99,9 @@ impl ExtractedFiles {
|
|||
}
|
||||
|
||||
/// * `path` - must be a relative path without `.`, `..`, `/`, `prefix:/`
|
||||
/// and must not be empty, for these values it is guaranteed to
|
||||
/// return `false`.
|
||||
/// But could be set to "." for top-level.
|
||||
/// and must not be empty, for these values it is guaranteed to
|
||||
/// return `false`.
|
||||
/// But could be set to "." for top-level.
|
||||
pub fn has_file(&self, path: &Path) -> bool {
|
||||
matches!(self.get_entry(path), Some(ExtractedFilesEntry::File))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue