]> git.lizzy.rs Git - rust.git/commitdiff
Apply suggestions from code review
authorPhoebe Bell <minaphoebebell@gmail.com>
Thu, 26 Dec 2019 19:57:57 +0000 (11:57 -0800)
committerPhoebe Bell <minaphoebebell@gmail.com>
Fri, 17 Jan 2020 02:27:44 +0000 (18:27 -0800)
Co-Authored-By: Ralf Jung <post@ralfj.de>
src/libcore/str/mod.rs

index 3139d6188e27f4ded62b33dd231161887aba6784..f89edf1910fac06f25f4c835b35ab5642f007f82 100644 (file)
@@ -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()) }
     }
 }