Skip to content

Commit f504dd5

Browse files
Enforce root Clippy lint policy (#14)
1 parent 8ecf1bd commit f504dd5

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

‎Cargo.toml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,17 @@ rust_2018_idioms = { level = "warn", priority = -1 }
1919
unreachable_pub = "warn"
2020

2121
[lints.clippy]
22+
all = { level = "deny", priority = -1 }
2223
pedantic = { level = "warn", priority = -1 }
2324
nursery = { level = "warn", priority = -1 }
2425
cargo = { level = "warn", priority = -1 }
25-
allow_attributes_without_reason = "warn"
26+
allow_attributes = "deny"
27+
allow_attributes_without_reason = "deny"
28+
cfg_not_test = "deny"
29+
dbg_macro = "deny"
30+
large_include_file = "deny"
31+
let_underscore_must_use = "deny"
32+
todo = "deny"
33+
unimplemented = "deny"
34+
unused_result_ok = "deny"
35+
unwrap_used = "deny"

‎tests/contents.rs‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ fn header_carries_the_declared_sqlite_version() {
4646

4747
#[test]
4848
fn crate_version_encodes_the_release() {
49-
let mut parts = SQLITE3MC_VERSION
50-
.split('.')
51-
.map(|part| part.parse::<u64>().unwrap());
49+
let mut parts = SQLITE3MC_VERSION.split('.').map(|part| {
50+
part.parse::<u64>()
51+
.expect("version component is an integer")
52+
});
5253
let (major, minor, patch) = (
53-
parts.next().unwrap(),
54-
parts.next().unwrap(),
55-
parts.next().unwrap(),
54+
parts.next().expect("version has a major component"),
55+
parts.next().expect("version has a minor component"),
56+
parts.next().expect("version has a patch component"),
5657
);
5758
let (numbers, metadata) = env!("CARGO_PKG_VERSION")
5859
.split_once('+')

0 commit comments

Comments
 (0)