File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,9 @@ impl MemoryHandler for Linear {
49
49
let src = core:: slice:: from_raw_parts ( src as * const u8 , PAGE_SIZE ) ;
50
50
dst[ ..length] . clone_from_slice ( & src[ ..length] ) ;
51
51
}
52
- for item in dst. iter_mut ( ) . take ( PAGE_SIZE ) . skip ( length) {
53
- * item = 0 ;
52
+ #[ allow( clippy:: needless_range_loop) ]
53
+ for i in length..PAGE_SIZE {
54
+ dst[ i] = 0 ;
54
55
}
55
56
}
56
57
}
@@ -85,8 +86,9 @@ impl MemoryHandler for ByFrame {
85
86
let src = core:: slice:: from_raw_parts ( src as * const u8 , PAGE_SIZE ) ;
86
87
dst[ ..length] . clone_from_slice ( & src[ ..length] ) ;
87
88
}
88
- for item in dst. iter_mut ( ) . take ( PAGE_SIZE ) . skip ( length) {
89
- * item = 0 ;
89
+ #[ allow( clippy:: needless_range_loop) ]
90
+ for i in length..PAGE_SIZE {
91
+ dst[ i] = 0 ;
90
92
}
91
93
}
92
94
}
You can’t perform that action at this time.
0 commit comments