Skip to content
Myr

Resolve manual_let_else pedantic clippy lint

Before adoption: this commit came in with the history the project adopted, so no landing records it.

warning: this could be rewritten as `let...else` --> build.rs:67:5 | 67 | / let rustc = match rustc_minor_version() { 68 | | Some(rustc) => rustc, 69 | | None => return, 70 | | }; | |______^ help: consider writing: `let Some(rustc) = rustc_minor_version() else { return };` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`

authored by David Tolnay · committed by David Tolnay · parent eea2acc · Browse files · 1 file+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:build.rs+2 added-3 removed
62 unmodified lines
63 println!("cargo:rerun-if-env-changed=RUSTC_BOOTSTRAP");64 }65 }6667 let rustc = match rustc_minor_version() {68 Some(rustc) => rustc,69 None => return,67 let Some(rustc) = rustc_minor_version() else {68 return;69 };7071 if rustc >= 80 {72 println!("cargo:rustc-check-cfg=cfg(anyhow_build_probe)");
135 unmodified lines