From 0e2eee4d7e9e8dac35c9782e7ed4155f54bf10af Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Wed, 28 Jun 2023 13:20:10 +0200 Subject: [PATCH] str type: make sentence more readable --- src/types/textual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/textual.md b/src/types/textual.md index 7f3899d70..65d563312 100644 --- a/src/types/textual.md +++ b/src/types/textual.md @@ -8,7 +8,7 @@ or 0xE000 to 0x10FFFF range. It is immediate [Undefined Behavior] to create a `char` that falls outside this range. A `[char]` is effectively a UCS-4 / UTF-32 string of length 1. -A value of type `str` is represented the same way as `[u8]`, it is a slice of +A value of type `str` is represented the same way as `[u8]`, a slice of 8-bit unsigned bytes. However, the Rust standard library makes extra assumptions about `str`: methods working on `str` assume and ensure that the data in there is valid UTF-8. Calling a `str` method with a non-UTF-8 buffer can cause