File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -884,7 +884,7 @@ impl LongNameBuilder {
884884 // last entry is actually first entry in stream
885885 self . index = index;
886886 self . chksum = data. checksum ( ) ;
887- self . buf . set_len ( index as usize * LFN_PART_LEN ) ;
887+ self . buf . set_len ( usize:: from ( index ) * LFN_PART_LEN ) ;
888888 } else if self . index == 0 || index != self . index - 1 || data. checksum ( ) != self . chksum {
889889 // Corrupted entry
890890 warn ! (
@@ -900,7 +900,7 @@ impl LongNameBuilder {
900900 // Decrement LFN index only for non-last entries
901901 self . index -= 1 ;
902902 }
903- let pos = LFN_PART_LEN * ( index - 1 ) as usize ;
903+ let pos = LFN_PART_LEN * usize :: from ( index - 1 ) ;
904904 // copy name parts into LFN buffer
905905 data. copy_name_to_slice ( & mut self . buf . ucs2_units [ pos..pos + 13 ] ) ;
906906 }
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ impl ShortName {
102102 }
103103
104104 fn as_bytes ( & self ) -> & [ u8 ] {
105- & self . name [ ..self . len as usize ]
105+ & self . name [ ..usize :: from ( self . len ) ]
106106 }
107107
108108 #[ cfg( feature = "alloc" ) ]
You can’t perform that action at this time.
0 commit comments