diff options
| author | Philipp Krones <hello@philkrones.com> | 2023-05-05 17:45:49 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2023-05-05 17:45:49 +0200 |
| commit | 7e9abb311df2ecc61ea294f98a6eda03612178ef (patch) | |
| tree | 0df45dc80cc4509473cb8a1d49ec16be50670f1c /clippy_lints/src/casts | |
| parent | 8518391e72e46d0a7886f582145793332055ab90 (diff) | |
| download | rust-7e9abb311df2ecc61ea294f98a6eda03612178ef.tar.gz rust-7e9abb311df2ecc61ea294f98a6eda03612178ef.zip | |
Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup
Diffstat (limited to 'clippy_lints/src/casts')
| -rw-r--r-- | clippy_lints/src/casts/mod.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/casts/unnecessary_cast.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/casts/mod.rs b/clippy_lints/src/casts/mod.rs index d74bd57fe45..cfeb75eed3b 100644 --- a/clippy_lints/src/casts/mod.rs +++ b/clippy_lints/src/casts/mod.rs @@ -638,7 +638,7 @@ declare_clippy_lint! { #[clippy::version = "1.66.0"] pub AS_PTR_CAST_MUT, nursery, - "casting the result of the `&self`-taking `as_ptr` to a mutabe pointer" + "casting the result of the `&self`-taking `as_ptr` to a mutable pointer" } declare_clippy_lint! { diff --git a/clippy_lints/src/casts/unnecessary_cast.rs b/clippy_lints/src/casts/unnecessary_cast.rs index 7e23318076c..804ae841100 100644 --- a/clippy_lints/src/casts/unnecessary_cast.rs +++ b/clippy_lints/src/casts/unnecessary_cast.rs @@ -141,9 +141,9 @@ fn lint_unnecessary_cast( fn get_numeric_literal<'e>(expr: &'e Expr<'e>) -> Option<&'e Lit> { match expr.kind { - ExprKind::Lit(ref lit) => Some(lit), + ExprKind::Lit(lit) => Some(lit), ExprKind::Unary(UnOp::Neg, e) => { - if let ExprKind::Lit(ref lit) = e.kind { + if let ExprKind::Lit(lit) = e.kind { Some(lit) } else { None |
