File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ impl<'a> PciNodeView<'a> {
165165 let parent_addr_cells = if let Some ( parent) = self . as_view ( ) . parent ( ) {
166166 parent. as_view ( ) . address_cells ( ) . unwrap_or ( 2 ) as usize
167167 } else {
168- 2 as usize
168+ 2_usize
169169 } ;
170170
171171 let size_cells = self . as_view ( ) . size_cells ( ) . unwrap_or ( 2 ) as usize ;
@@ -361,7 +361,7 @@ impl<'a> PciNodeView<'a> {
361361
362362 // 如果 encoded_address 比 child_addr_cells 短,填充 0
363363 let remaining = child_addr_cells. saturating_sub ( encoded_address. len ( ) ) ;
364- masked_child_address. extend ( core:: iter:: repeat ( 0 ) . take ( remaining) ) ;
364+ masked_child_address. extend ( core:: iter:: repeat_n ( 0 , remaining) ) ;
365365
366366 let encoded_irq = [ interrupt_pin as u32 ] ;
367367 let mut masked_child_irq = Vec :: with_capacity ( child_irq_cells) ;
@@ -377,7 +377,7 @@ impl<'a> PciNodeView<'a> {
377377
378378 // 如果 encoded_irq 比 child_irq_cells 短,填充 0
379379 let remaining_irq = child_irq_cells. saturating_sub ( encoded_irq. len ( ) ) ;
380- masked_child_irq. extend ( core:: iter:: repeat ( 0 ) . take ( remaining_irq) ) ;
380+ masked_child_irq. extend ( core:: iter:: repeat_n ( 0 , remaining_irq) ) ;
381381
382382 // 在 interrupt-map 中查找匹配的条目
383383 for mapping in & interrupt_map {
You can’t perform that action at this time.
0 commit comments