diff --git a/README.md b/README.md index ac3c26b..5d508e7 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Add this in your `Cargo.toml`: ```toml [dependencies] -colored = "1.9" +colored = "2" ``` and add this to your `lib.rs` or `main.rs`: diff --git a/src/lib.rs b/src/lib.rs index 64d1dd2..4475320 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,11 +40,7 @@ mod style; pub use color::*; -use std::convert::From; -use std::fmt; -use std::ops::Deref; -use std::string::String; -use std::borrow::Cow; +use std::{borrow::Cow, fmt, ops::Deref}; pub use style::{Style, Styles}; @@ -423,7 +419,7 @@ impl ColoredString { .map(|(idx, _)| idx) .collect(); if matches.is_empty() { - return self.input.as_str().into() + return self.input.as_str().into(); } let mut input = self.input.clone();