From 40fce81e1c0fdd6f095a345c87ad895c6f63a04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enes=20Ayd=C4=B1n?= Date: Mon, 6 May 2024 19:33:46 +0300 Subject: [PATCH] Clarify `String` definition (#2044) Changed string definitions in string.md and strings.md files according to discussion #2028 --- src/references/strings.md | 2 +- src/std-types/string.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/references/strings.md b/src/references/strings.md index e0a49a9a..3b75db94 100644 --- a/src/references/strings.md +++ b/src/references/strings.md @@ -11,7 +11,7 @@ Including `&str` as a way of representing a slice of valid utf-8 We can now understand the two string types in Rust: - `&str` is a slice of UTF-8 encoded bytes, similar to `&[u8]`. -- `String` is an owned, heap-allocated buffer of UTF-8 bytes. +- `String` is an owned buffer of UTF-8 encoded bytes, similar to `Vec`. diff --git a/src/std-types/string.md b/src/std-types/string.md index d32bf1b6..8f15f33e 100644 --- a/src/std-types/string.md +++ b/src/std-types/string.md @@ -4,7 +4,7 @@ minutes: 10 # String -[`String`][1] is the standard heap-allocated growable UTF-8 string buffer: +[`String`][1] is a growable UTF-8 encoded string: ```rust,editable fn main() {