Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Sep 20, 2024
1 parent 3e5099a commit ecbddb6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ rustflags = [
"-Wclippy::match_wild_err_arm",
"-Wclippy::match_wildcard_for_single_variants",
"-Wclippy::mem_forget",
"-Wclippy::mismatched_target_os",
"-Wclippy::missing_enforced_import_renames",
"-Wclippy::mut_mut",
"-Wclippy::mutex_integer",
Expand Down Expand Up @@ -77,6 +76,7 @@ rustflags = [
"-Wfuture_incompatible",
"-Wnonstandard_style",
"-Wrust_2018_idioms",
"-Wunexpected_cfgs",
# END - Embark standard lints v6 for Rust 1.55+

# We want all public items to have at least _some_ documentation
Expand Down
5 changes: 1 addition & 4 deletions src/index/local/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ impl<'iv> super::ValidKrate<'iv> {
config: &crate::index::IndexConfig,
version: &'iv crate::IndexVersion,
) -> Result<Self, Error> {
let url = config.download_url(
version.name.as_str().try_into()?,
&version.version.to_string(),
);
let url = config.download_url(version.name.as_str().try_into()?, version.version.as_ref());

let res = client.inner.get(url).send()?.error_for_status()?;
let body = res.bytes()?;
Expand Down
5 changes: 1 addition & 4 deletions src/krate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ impl IndexVersion {
/// Retrieves the URL this crate version's tarball can be downloaded from
#[inline]
pub fn download_url(&self, index: &crate::index::IndexConfig) -> Option<String> {
Some(index.download_url(
self.name.as_str().try_into().ok()?,
&self.version.to_string(),
))
Some(index.download_url(self.name.as_str().try_into().ok()?, self.version.as_ref()))
}
}

Expand Down

0 comments on commit ecbddb6

Please sign in to comment.