File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 247
247
#![ feature( cfg_target_has_atomic) ]
248
248
#![ feature( cfg_target_thread_local) ]
249
249
#![ feature( char_error_internals) ]
250
+ #![ feature( char_internals) ]
250
251
#![ feature( clamp) ]
251
252
#![ feature( concat_idents) ]
252
253
#![ feature( const_cstr_unchecked) ]
Original file line number Diff line number Diff line change @@ -201,9 +201,8 @@ impl Wtf8Buf {
201
201
/// Copied from String::push
202
202
/// This does **not** include the WTF-8 concatenation check.
203
203
fn push_code_point_unchecked ( & mut self , code_point : CodePoint ) {
204
- let c = unsafe { char:: from_u32_unchecked ( code_point. value ) } ;
205
204
let mut bytes = [ 0 ; 4 ] ;
206
- let bytes = c . encode_utf8 ( & mut bytes) . as_bytes ( ) ;
205
+ let bytes = char :: encode_utf8_raw ( code_point . value , & mut bytes) . as_bytes ( ) ;
207
206
self . bytes . extend_from_slice ( bytes)
208
207
}
209
208
You can’t perform that action at this time.
0 commit comments