Fix clippy

This commit is contained in:
Kasper 2025-05-30 00:23:51 +02:00
parent 0fb5241633
commit 0a1a108c0b
No known key found for this signature in database
GPG Key ID: 3E47D7CD99820B85
3 changed files with 7 additions and 10 deletions

View File

@ -27,3 +27,9 @@ unicode-segmentation = "1.10"
[dev-dependencies]
regex = "1.7"
[lints.clippy]
comparison_chain = "allow"
if_same_then_else = "allow"
match_like_matches_macro = "allow"
get_first = "allow"

View File

@ -89,8 +89,7 @@ pub fn sin(mut input: d128) -> d128 {
let unrounded_result = negative_correction * result;
// This uses bankers rounding, but I *think* it's fine
let result = unrounded_result.quantize(rounding_base());
result
unrounded_result.quantize(rounding_base())
}
/// Returns the cosine of a [`struct@d128`]

View File

@ -1,11 +1,3 @@
#![cfg_attr(
feature = "cargo-clippy",
allow(
clippy::comparison_chain,
clippy::if_same_then_else,
clippy::match_like_matches_macro,
)
)]
//! calculation + conversion
//!
//! cpc parses and evaluates strings of math, with support for units and conversion. 128-bit decimal floating points are used for high accuracy.