File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 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>) {
977977
978978 scratch. reserve ( 4 ) ;
979979
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.
984985 unsafe {
985986 let ptr = scratch. as_mut_ptr ( ) . add ( scratch. len ( ) ) ;
986987
You can’t perform that action at this time.
0 commit comments