Minimize unsafety in encode_utf8

Use slice patterns to avoid having to skip bounds checking
This commit is contained in:
Mark Rousskov
2019-12-23 15:40:20 -05:00
parent 9ae6cedb8d
commit df4d490038
2 changed files with 30 additions and 30 deletions

View File

@@ -129,6 +129,7 @@
#![feature(associated_type_bounds)]
#![feature(const_type_id)]
#![feature(const_caller_location)]
#![feature(slice_patterns)]
#[prelude_import]
#[allow(unused)]