Epand lints

This commit is contained in:
2025-04-04 01:16:35 -06:00
parent 669b9d5845
commit 0d7edf525e
2 changed files with 17 additions and 2 deletions
+16 -1
View File
@@ -8,13 +8,28 @@ license-file = "LICENSE.md"
resolver = "2" resolver = "2"
rust-version = "1.85.0" rust-version = "1.85.0"
[workspace.lints.rust] [lints.rust]
arithmetic_overflow = "forbid"
unsafe_code = "forbid" unsafe_code = "forbid"
[lints.clippy]
arithmetic_side_effects = "forbid"
as_conversions = "forbid"
checked_conversions = "forbid"
default_union_representation = "forbid"
expect_used = "forbid"
indexing_slicing = "forbid"
integer_division = "forbid"
integer_division_remainder_used = "forbid"
transmute_undefined_repr = "forbid"
unchecked_duration_subtraction = "forbid"
unwrap_used = "forbid"
[profile.release] [profile.release]
codegen-units = 1 codegen-units = 1
lto = "fat" lto = "fat"
opt-level = 3 opt-level = 3
overflow-checks = true
strip = "debuginfo" strip = "debuginfo"
[dependencies] [dependencies]
+1 -1
View File
@@ -1,5 +1,5 @@
pub fn add(left: usize, right: usize) -> usize { pub fn add(left: usize, right: usize) -> usize {
left + right left.wrapping_add(right)
} }
#[cfg(test)] #[cfg(test)]