Skip to content

Commit

Permalink
revise: fixes clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
claymcleod committed Jan 30, 2025
1 parent e24edd9 commit 0547a84
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
22 changes: 21 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,29 @@ missing_docs = "warn"
nonstandard-style = "warn"
rust-2018-idioms = "warn"
rust-2021-compatibility = "warn"
rust-2024-compatibility = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }

# Re-enable this lint and remove the group expansion lints after auditing remaining diagnostics as we get closer to the 2024 release
# rust-2024-compatibility = "warn"
# <expansion>
boxed-slice-into-iter = "warn"
dependency-on-unit-never-type-fallback = "warn"
deprecated-safe-2024 = "warn"
edition-2024-expr-fragment-specifier = "allow" # Reason: the few macros where we use the `expr` fragment will not break with the new expressions
if-let-rescope = "allow" # Reason: lint is too noisy and we are unlikely to have drop order dependencies
impl-trait-overcaptures = "warn"
keyword-idents-2024 = "warn"
missing-unsafe-on-extern = "warn"
never-type-fallback-flowing-into-unsafe = "warn"
rust-2024-guarded-string-incompatible-syntax = "warn"
rust-2024-incompatible-pat = "warn"
rust-2024-prelude-collisions = "warn"
static-mut-refs = "warn"
tail-expr-drop-order = "allow" # Reason: lint is too noisy and we are unlikely to have drop order dependencies
unsafe-attr-outside-unsafe = "warn"
unsafe-op-in-unsafe-fn = "warn"
# </expansion>

[workspace.lints.rustdoc]
broken_intra_doc_links = "warn"

Expand Down
8 changes: 4 additions & 4 deletions crankshaft-docker/src/images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ pub(crate) async fn ensure_image(
}

/// Removes an image from the Docker daemon.
pub(crate) async fn remove_image(
pub(crate) async fn remove_image<T: AsRef<str>, U: AsRef<str>>(
docker: &Docker,
name: impl AsRef<str>,
tag: impl AsRef<str>,
) -> Result<impl IntoIterator<Item = ImageDeleteResponseItem>> {
name: T,
tag: U,
) -> Result<impl IntoIterator<Item = ImageDeleteResponseItem> + use<T, U>> {
let name = name.as_ref();
let tag = tag.as_ref();

Expand Down
8 changes: 4 additions & 4 deletions crankshaft-docker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ impl Docker {
}

/// Removes an image from the Docker daemon.
pub async fn remove_image(
pub async fn remove_image<T: AsRef<str>, U: AsRef<str>>(
&self,
name: impl AsRef<str>,
tag: impl AsRef<str>,
) -> Result<impl IntoIterator<Item = ImageDeleteResponseItem>> {
name: T,
tag: U,
) -> Result<impl IntoIterator<Item = ImageDeleteResponseItem> + use<T, U>> {
remove_image(self, name, tag).await
}

Expand Down

0 comments on commit 0547a84

Please sign in to comment.