Remove unnecessary [..]

Replaces  (&self[..]).strip_formatting() with (&self).strip_formatting() in `impl FormattedStringExt for String`
This commit is contained in:
Frederik B 2018-05-16 11:15:43 +02:00 committed by GitHub
parent a8a48bf4a1
commit acc6d7f0f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,10 +102,10 @@ impl FormattedStringExt for str {
impl FormattedStringExt for String { impl FormattedStringExt for String {
fn is_formatted(&self) -> bool { fn is_formatted(&self) -> bool {
(&self[..]).is_formatted() (&self).is_formatted()
} }
fn strip_formatting(&self) -> Cow<str> { fn strip_formatting(&self) -> Cow<str> {
(&self[..]).strip_formatting() (&self).strip_formatting()
} }
} }