Apply suggestions from code review
Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
parent
a93e99cae7
commit
e0140ffeb0
1 changed files with 1 additions and 1 deletions
|
|
@ -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()) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue