File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ impl Id {
5454}
5555
5656impl 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 {
9393impl 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 ( )
You can’t perform that action at this time.
0 commit comments