Skip to content

Commit 7df4177

Browse files
authored
Clippy (#122)
1 parent ca4948b commit 7df4177

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ license = "MIT OR Apache-2.0"
88
repository = "https://github.com/tdelmas/typed_floats"
99
version = "1.0.1"
1010
rust-version = "1.70"
11+
keywords = ["floats", "non-zero", "nan", "no_std"]
12+
categories = ["mathematics", "data-structures"]

typed_floats/Cargo.toml

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
22
name = "typed_floats"
33
description = "Types for handling floats with type checking at compile time."
4-
categories = ["mathematics", "data-structures"]
54
version.workspace = true
65
edition.workspace = true
76
license.workspace = true
@@ -12,7 +11,8 @@ include = [
1211
"src/**/*.rs",
1312
"*.md",
1413
]
15-
keywords = ["floats", "non-zero", "nan", "no_std"]
14+
keywords.workspace = true
15+
categories.workspace = true
1616
readme = "./README.md"
1717
rust-version.workspace = true
1818

@@ -55,3 +55,14 @@ num-traits = "0.2"
5555

5656
[package.metadata.docs.rs]
5757
features = ["serde"]
58+
59+
[lints.clippy]
60+
cargo = { priority = -1, level = "deny" }
61+
complexity = { priority = -1, level = "deny" }
62+
correctness = { priority = -1, level = "deny" }
63+
suspicious = { priority = -1, level = "deny" }
64+
style = { priority = -1, level = "deny" }
65+
perf = { priority = -1, level = "deny" }
66+
pedantic = { priority = -1, level = "deny" }
67+
nursery = { priority = -1, level = "deny" }
68+
# restriction = { priority = -1, level = "deny" }

typed_floats/src/macros.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ macro_rules! as_const {
226226
($type:ident, $float:ident, $x:expr) => {{
227227
const TMP: $float = $x;
228228

229-
// FIXME: Is that sound? https://github.com/rust-lang/rust/issues/57241
230-
229+
#[allow(clippy::float_cmp_const)]
231230
if TMP != TMP {
232231
panic!("NaN is not valid")
233232
} else if TMP == core::$float::INFINITY && !$crate::$type::accept_infinity() {

typed_floats_macros/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ license.workspace = true
77
repository.workspace = true
88
readme = "./README.md"
99
rust-version.workspace = true
10+
keywords.workspace = true
11+
categories.workspace = true
1012

1113
[lib]
1214
proc-macro = true

xtask/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
[package]
22
name = "xtask"
3+
description = "Action helper for the typed_floats crate"
34
version.workspace = true
45
edition.workspace = true
56
license.workspace = true
67
repository.workspace = true
78
rust-version.workspace = true
9+
keywords.workspace = true
10+
categories.workspace = true
11+
readme = "../CONTRIB.md"
812

913
[dependencies]
1014
toml = "0.8"

0 commit comments

Comments
 (0)