Skip to content

Commit beb6eec

Browse files
cgzonesmatze
authored andcommitted
Reduce scope of clippy overrides
1 parent c0fc833 commit beb6eec

File tree

1 file changed

+3
-2
lines changed
  • crates/wastebin_core/src

1 file changed

+3
-2
lines changed

crates/wastebin_core/src/id.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ impl Id {
5454
}
5555

5656
impl fmt::Display for Id {
57-
#[expect(clippy::cast_sign_loss)]
5857
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5958
match self {
6059
Self::Id32(n) => {
@@ -69,6 +68,7 @@ impl fmt::Display for Id {
6968

7069
write!(f, "{s}")
7170
}
71+
#[expect(clippy::cast_sign_loss)]
7272
Self::Id64(n) => {
7373
let mut s = String::with_capacity(11);
7474

@@ -93,12 +93,12 @@ impl fmt::Display for Id {
9393
impl FromStr for Id {
9494
type Err = Error;
9595

96-
#[expect(clippy::cast_possible_truncation, clippy::cast_possible_wrap)]
9796
fn from_str(value: &str) -> Result<Self, Self::Err> {
9897
if value.len() == 6 {
9998
let mut n: u32 = 0;
10099

101100
for (pos, char) in value.chars().enumerate() {
101+
#[expect(clippy::cast_possible_truncation)]
102102
let bits: u32 = CHAR_TABLE
103103
.iter()
104104
.enumerate()
@@ -117,6 +117,7 @@ impl FromStr for Id {
117117
let mut n: i64 = 0;
118118

119119
for (pos, char) in value.chars().enumerate() {
120+
#[expect(clippy::cast_possible_wrap)]
120121
let bits: i64 = CHAR_TABLE
121122
.iter()
122123
.enumerate()

0 commit comments

Comments
 (0)