File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed
gdbstub_arch/src/riscv/reg Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ rustflags = [
2020 " -Wclippy::lossy_float_literal" ,
2121 " -Wclippy::macro_use_imports" ,
2222 " -Wclippy::map_flatten" ,
23- " -Wclippy::match_on_vec_items" ,
2423 " -Wclippy::needless_borrow" ,
2524 " -Wclippy::needless_continue" ,
2625 " -Wclippy::option_option" ,
Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ mod custom_arch {
471471
472472 fn gdb_deserialize ( & mut self , bytes : & [ u8 ] ) -> Result < ( ) , ( ) > {
473473 // ensure bytes.chunks_exact(4) won't panic
474- if bytes. len ( ) % 4 != 0 {
474+ if ! bytes. len ( ) . is_multiple_of ( 4 ) {
475475 return Err ( ( ) ) ;
476476 }
477477
Original file line number Diff line number Diff line change 5353 let ptrsize = core:: mem:: size_of :: < U > ( ) ;
5454
5555 // ensure bytes.chunks_exact(ptrsize) won't panic
56- if bytes. len ( ) % ptrsize != 0 {
56+ if ! bytes. len ( ) . is_multiple_of ( ptrsize) {
5757 return Err ( ( ) ) ;
5858 }
5959
You can’t perform that action at this time.
0 commit comments