From acc6d7f0f0f5246ba6f2040ddc5b10eaf93511a3 Mon Sep 17 00:00:00 2001 From: Frederik B Date: Wed, 16 May 2018 11:15:43 +0200 Subject: [PATCH] Remove unnecessary [..] Replaces (&self[..]).strip_formatting() with (&self).strip_formatting() in `impl FormattedStringExt for String` --- src/proto/colors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proto/colors.rs b/src/proto/colors.rs index f86548c..6ffb492 100644 --- a/src/proto/colors.rs +++ b/src/proto/colors.rs @@ -102,10 +102,10 @@ impl FormattedStringExt for str { impl FormattedStringExt for String { fn is_formatted(&self) -> bool { - (&self[..]).is_formatted() + (&self).is_formatted() } fn strip_formatting(&self) -> Cow { - (&self[..]).strip_formatting() + (&self).strip_formatting() } } @@ -160,4 +160,4 @@ mod test { fn test_strip_string_with_digit_after_2digit_color() { assert_eq!("\x031212\x031111\x031010".strip_formatting(), "121110"); } -} \ No newline at end of file +}