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,
@@ -485,13 +484,14 @@ impl<'de> Deserializer<'de> {
485
484
len,
486
485
) ;
487
486
488
- input_buffer. as_mut_ptr ( ) . add ( len) . write ( 0 ) ;
487
+ let to_fill = input_buffer. capacity ( ) - len;
488
+ std:: ptr:: write_bytes ( input_buffer. as_mut_ptr ( ) . add ( len) , 0 , to_fill) ;
489
489
490
- input_buffer. set_len ( len ) ;
490
+ input_buffer. set_len ( input_buffer . capacity ( ) ) ;
491
491
} ;
492
492
493
493
let s1_result: std:: result:: Result < Vec < u32 > , ErrorType > =
494
- unsafe { Self :: find_structural_bits ( input_buffer ) } ;
494
+ unsafe { Self :: find_structural_bits ( input ) } ;
495
495
496
496
let structural_indexes = match s1_result {
497
497
Ok ( i) => i,
You can’t perform that action at this time.
0 commit comments