File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ impl Id {
54
54
}
55
55
56
56
impl fmt:: Display for Id {
57
- #[ expect( clippy:: cast_sign_loss) ]
58
57
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
59
58
match self {
60
59
Self :: Id32 ( n) => {
@@ -69,6 +68,7 @@ impl fmt::Display for Id {
69
68
70
69
write ! ( f, "{s}" )
71
70
}
71
+ #[ expect( clippy:: cast_sign_loss) ]
72
72
Self :: Id64 ( n) => {
73
73
let mut s = String :: with_capacity ( 11 ) ;
74
74
@@ -93,12 +93,12 @@ impl fmt::Display for Id {
93
93
impl FromStr for Id {
94
94
type Err = Error ;
95
95
96
- #[ expect( clippy:: cast_possible_truncation, clippy:: cast_possible_wrap) ]
97
96
fn from_str ( value : & str ) -> Result < Self , Self :: Err > {
98
97
if value. len ( ) == 6 {
99
98
let mut n: u32 = 0 ;
100
99
101
100
for ( pos, char) in value. chars ( ) . enumerate ( ) {
101
+ #[ expect( clippy:: cast_possible_truncation) ]
102
102
let bits: u32 = CHAR_TABLE
103
103
. iter ( )
104
104
. enumerate ( )
@@ -117,6 +117,7 @@ impl FromStr for Id {
117
117
let mut n: i64 = 0 ;
118
118
119
119
for ( pos, char) in value. chars ( ) . enumerate ( ) {
120
+ #[ expect( clippy:: cast_possible_wrap) ]
120
121
let bits: i64 = CHAR_TABLE
121
122
. iter ( )
122
123
. enumerate ( )
You can’t perform that action at this time.
0 commit comments