File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -977,10 +977,11 @@ fn push_wtf8_codepoint(n: u32, scratch: &mut Vec<u8>) {
977
977
978
978
scratch. reserve ( 4 ) ;
979
979
980
- // SAFETY: After the `reserve` call, `scratch` has at least 4 bytes of allocated but
981
- // unintialized memory after its last initialized byte, which is where `ptr` points. All
982
- // reachable match arms write `encoded_len` bytes to that region and update the length
983
- // accordingly, and `encoded_len` is always <= 4.
980
+ // SAFETY: After the `reserve` call, `scratch` has at least 4 bytes of
981
+ // allocated but unintialized memory after its last initialized byte, which
982
+ // is where `ptr` points. All reachable match arms write `encoded_len` bytes
983
+ // to that region and update the length accordingly, and `encoded_len` is
984
+ // always <= 4.
984
985
unsafe {
985
986
let ptr = scratch. as_mut_ptr ( ) . add ( scratch. len ( ) ) ;
986
987
You can’t perform that action at this time.
0 commit comments