Epand lints

This commit is contained in:
2025-04-04 01:16:31 -06:00
parent c6ed019df7
commit 72e376d74c
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -9,12 +9,27 @@ license-file = "LICENSE.md"
rust-version = "1.85.0" rust-version = "1.85.0"
[workspace.lints.rust] [workspace.lints.rust]
arithmetic_overflow = "forbid"
unsafe_code = "forbid" unsafe_code = "forbid"
[workspace.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"
[workspace.dependencies] [workspace.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)]