File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
#![ deny( warnings) ]
2
2
#![ cfg_attr( feature = "hints" , feature( core_intrinsics) ) ]
3
- #![ deny( warnings) ]
4
3
#![ warn( unused_extern_crates) ]
5
4
#![ deny(
6
5
clippy:: all,
@@ -488,13 +487,14 @@ impl<'de> Deserializer<'de> {
488
487
len,
489
488
) ;
490
489
491
- input_buffer. as_mut_ptr ( ) . add ( len) . write ( 0 ) ;
490
+ let to_fill = input_buffer. capacity ( ) - len;
491
+ std:: ptr:: write_bytes ( input_buffer. as_mut_ptr ( ) . add ( len) , 0 , to_fill) ;
492
492
493
- input_buffer. set_len ( len ) ;
493
+ input_buffer. set_len ( input_buffer . capacity ( ) ) ;
494
494
} ;
495
495
496
496
let s1_result: std:: result:: Result < Vec < u32 > , ErrorType > =
497
- unsafe { Self :: find_structural_bits ( input_buffer ) } ;
497
+ unsafe { Self :: find_structural_bits ( input ) } ;
498
498
499
499
let structural_indexes = match s1_result {
500
500
Ok ( i) => i,
You can’t perform that action at this time.
0 commit comments