Skip to content

Commit d5f0758

Browse files
authored
fix(str.md): avoid misunderstanding that there were only two string types
With the previous wording, some might think there are exactly two string types in Rust. Even in the standard library you find more string types than `String` and `&str`, like CStr, OsStr or Path. It is also possible to define your own string types, so theoretically there is an infinite amount of string types in Rust.
1 parent ddf5cb0 commit d5f0758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/std/str.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Strings
22

3-
There are two types of strings in Rust: `String` and `&str`.
3+
The two most used string types in Rust are `String` and `&str`.
44

55
A `String` is stored as a vector of bytes (`Vec<u8>`), but guaranteed to
66
always be a valid UTF-8 sequence. `String` is heap allocated, growable and not

0 commit comments

Comments
 (0)