Skip to content

Commit 327ba29

Browse files
committed
Ignore clippy::unnecessary_map_or lint
``` error: this `map_or` is redundant --> tests/no-core/build.rs:15:5 | 15 | / env::var_os("RUSTC") 16 | | .and_then(|rustc| Command::new(rustc).arg("--version").output().ok()) 17 | | .and_then(|output| String::from_utf8(output.stdout).ok()) 18 | | .map_or(false, |version| version.contains("nightly") || version.contains("dev")) | |________________________________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or = note: `-D clippy::unnecessary-map-or` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]` help: use is_some_and instead | 15 ~ env::var_os("RUSTC") 16 + .and_then(|rustc| Command::new(rustc).arg("--version").output().ok()) 17 + .and_then(|output| String::from_utf8(output.stdout).ok()).is_some_and(|version| version.contains("nightly") || version.contains("dev")) | ```
1 parent fde6a7f commit 327ba29

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/no-core/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "no-core"
33
version = "0.0.0"
44
edition = "2018"
5+
rust-version = "1.37" # Prevent clippy from suggesting a code that requires a new version.
56
publish = false
67

78
[lib]

0 commit comments

Comments
 (0)