Closed freddyb closed 6 years ago
Looks good to me, thanks!
On rustc 1.28.0, this change raises a warning like below.
warning: function cannot return without recurring
--> src/proto/colors.rs:104:5
|
104 | fn is_formatted(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
105 | (&self).is_formatted()
| ---------------------- recursive call site
|
= note: #[warn(unconditional_recursion)] on by default
= help: a `loop` may express intention better if this is on purpose
warning: function cannot return without recurring
--> src/proto/colors.rs:107:5
|
107 | fn strip_formatting(&self) -> Cow<str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recurring
108 | (&self).strip_formatting()
| -------------------------- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
Replaces
(&self[..]).strip_formatting()
with(&self).strip_formatting()
inimpl FormattedStringExt for String