refactor(version): Directly convert rendered to styled

This commit is contained in:
Ed Page 2023-03-16 14:17:01 -05:00
parent 6255229a9c
commit 9516fd928f
2 changed files with 2 additions and 6 deletions

View file

@ -4673,9 +4673,7 @@ impl Command {
pub(crate) fn write_version_err(&self, use_long: bool) -> StyledStr {
let msg = self._render_version(use_long);
let mut styled = StyledStr::new();
styled.none(msg);
styled
StyledStr::from(msg)
}
pub(crate) fn long_help_exists(&self) -> bool {

View file

@ -171,9 +171,7 @@ impl Default for &'_ StyledStr {
impl From<std::string::String> for StyledStr {
fn from(name: std::string::String) -> Self {
let mut styled = StyledStr::new();
styled.none(name);
styled
StyledStr(name)
}
}