diff options
| author | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2014-02-20 16:56:22 +0100 |
|---|---|---|
| committer | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2014-02-20 16:56:22 +0100 |
| commit | b734699df124e13bcb7054a892dad9dbd027c32f (patch) | |
| tree | c128d8a9243cdfb08213f4fdf9650f554dc972df /src/libstd/str.rs | |
| parent | 5f324aaf203a9611e9c3ead934d64f92f136ee00 (diff) | |
| download | rust-b734699df124e13bcb7054a892dad9dbd027c32f.tar.gz rust-b734699df124e13bcb7054a892dad9dbd027c32f.zip | |
Fix some typos.
Diffstat (limited to 'src/libstd/str.rs')
| -rw-r--r-- | src/libstd/str.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs index c3f79ff7139..cf09d7a6b9e 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -17,7 +17,7 @@ Unicode string manipulation (`str` type) Rust's string type is one of the core primitive types of the language. While represented by the name `str`, the name `str` is not actually a valid type in Rust. Each string must also be decorated with its ownership. This means that -there are two common kinds of strings in rust: +there are two common kinds of strings in Rust: * `~str` - This is an owned string. This type obeys all of the normal semantics of the `~T` types, meaning that it has one, and only one, owner. This @@ -39,7 +39,7 @@ fn main() { } ``` -From the example above, you can see that rust has 2 different kinds of string +From the example above, you can see that Rust has 2 different kinds of string literals. The owned literals correspond to the owned string types, but the "borrowed literal" is actually more akin to C's concept of a static string. @@ -51,7 +51,7 @@ inferred from the type, these static strings are not mutable. # Mutability -Many languages have immutable strings by default, and rust has a particular +Many languages have immutable strings by default, and Rust has a particular flavor on this idea. As with the rest of Rust types, strings are immutable by default. If a string is declared as `mut`, however, it may be mutated. This works the same way as the rest of Rust's type system in the sense that if |
