From ee48c4684a44efd4d63a73dbaaba68c6f710d44a Mon Sep 17 00:00:00 2001 From: Noam Zaks Date: Tue, 10 Oct 2023 11:15:21 +0300 Subject: [PATCH] Fix typo: include semi colon in code (#1335) --- src/std/string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/std/string.md b/src/std/string.md index 9128ee13..291e1d5d 100644 --- a/src/std/string.md +++ b/src/std/string.md @@ -33,7 +33,7 @@ fn main() { * When people refer to strings they could either be talking about `&str` or `String`. * When a type implements `Deref`, the compiler will let you transparently call methods from `T`. * `String` implements `Deref` which transparently gives it access to `str`'s methods. - * Write and compare `let s3 = s1.deref();` and `let s3 = &*s1`;. + * Write and compare `let s3 = s1.deref();` and `let s3 = &*s1;`. * `String` is implemented as a wrapper around a vector of bytes, many of the operations you see supported on vectors are also supported on `String`, but with some extra guarantees. * Compare the different ways to index a `String`: * To a character by using `s3.chars().nth(i).unwrap()` where `i` is in-bound, out-of-bounds.