diff --git a/crates/binstalk-downloader/src/download/extracted_files.rs b/crates/binstalk-downloader/src/download/extracted_files.rs index bf4c0f8a..ac45d4fb 100644 --- a/crates/binstalk-downloader/src/download/extracted_files.rs +++ b/crates/binstalk-downloader/src/download/extracted_files.rs @@ -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)) } diff --git a/crates/binstalk-downloader/src/remote.rs b/crates/binstalk-downloader/src/remote.rs index 66fd365c..1ab1391c 100644 --- a/crates/binstalk-downloader/src/remote.rs +++ b/crates/binstalk-downloader/src/remote.rs @@ -390,7 +390,7 @@ fn parse_header_retry_after(headers: &HeaderMap) -> Option<Duration> { let header = headers .get_all(RETRY_AFTER) .into_iter() - .last()? + .next_back()? .to_str() .ok()?; diff --git a/crates/binstalk-manifests/src/cargo_config.rs b/crates/binstalk-manifests/src/cargo_config.rs index dc9985dc..22e25971 100644 --- a/crates/binstalk-manifests/src/cargo_config.rs +++ b/crates/binstalk-manifests/src/cargo_config.rs @@ -86,9 +86,9 @@ impl Config { } /// * `dir` - path to the dir where the config.toml is located. - /// For relative path in the config, `Config::load_from_reader` - /// will join the `dir` and the relative path to form the final - /// path. + /// For relative path in the config, `Config::load_from_reader` + /// will join the `dir` and the relative path to form the final + /// path. pub fn load_from_reader<R: io::Read>( mut reader: R, dir: &Path,