Merge pull request #137 from freddyb/patch-1

Remove unnecessary [..]
This commit is contained in:
Aaron Weiss 2018-05-16 23:01:15 +02:00 committed by GitHub
commit 88b7b5f18b
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 {
fn is_formatted(&self) -> bool {
(&self[..]).is_formatted()
(&self).is_formatted()
}
fn strip_formatting(&self) -> Cow<str> {
(&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");
}
}
}