diff options
| author | Phoebe Bell <minaphoebebell@gmail.com> | 2019-12-26 11:57:57 -0800 |
|---|---|---|
| committer | Phoebe Bell <minaphoebebell@gmail.com> | 2020-01-16 18:27:44 -0800 |
| commit | e0140ffeb0a7378f6568f5b8efebcfc58278f03a (patch) | |
| tree | b694c17a9577bf0b6425a049e0f66dbf8e312b1b /src/libcore | |
| parent | a93e99cae7c1e6352304f65be93f28f1b5713231 (diff) | |
| download | rust-e0140ffeb0a7378f6568f5b8efebcfc58278f03a.tar.gz rust-e0140ffeb0a7378f6568f5b8efebcfc58278f03a.zip | |
Apply suggestions from code review
Co-Authored-By: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/str/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 3139d6188e2..f89edf1910f 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -659,7 +659,7 @@ impl<'a> Chars<'a> { #[stable(feature = "iter_to_slice", since = "1.4.0")] #[inline] pub fn as_str(&self) -> &'a str { - // SAFETY: Chars is only made from a str, which guarantees the iter is valid utf8 + // SAFETY: `Chars` is only made from a str, which guarantees the iter is valid utf8 unsafe { from_utf8_unchecked(self.iter.as_slice()) } } } |
