diff options
| author | Ralf Jung <post@ralfj.de> | 2020-05-30 17:13:07 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-05-30 17:27:34 +0200 |
| commit | 0fb6e63c0438ace4ad9d496376af955c0baacf04 (patch) | |
| tree | 86be9b89d2b2099983548b5407f970df19a4b8b6 /src/libstd/sys_common/wtf8.rs | |
| parent | 9c627c33dde998cfe42bcde07e1c5692370daf63 (diff) | |
| download | rust-0fb6e63c0438ace4ad9d496376af955c0baacf04.tar.gz rust-0fb6e63c0438ace4ad9d496376af955c0baacf04.zip | |
encode_utf8_raw is not always valid UTF-8; clarify comments
Diffstat (limited to 'src/libstd/sys_common/wtf8.rs')
| -rw-r--r-- | src/libstd/sys_common/wtf8.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys_common/wtf8.rs b/src/libstd/sys_common/wtf8.rs index 9f589c93ae5..ccb54b7e68d 100644 --- a/src/libstd/sys_common/wtf8.rs +++ b/src/libstd/sys_common/wtf8.rs @@ -202,7 +202,7 @@ impl Wtf8Buf { /// This does **not** include the WTF-8 concatenation check. fn push_code_point_unchecked(&mut self, code_point: CodePoint) { let mut bytes = [0; 4]; - let bytes = char::encode_utf8_raw(code_point.value, &mut bytes).as_bytes(); + let bytes = char::encode_utf8_raw(code_point.value, &mut bytes); self.bytes.extend_from_slice(bytes) } |
