suffix;
}
vec! {
- suffix.truncate(width).to_owned()
+ suffix.truncate(width).into()
}
}
}
ColouredString::uniform(
&("-".repeat(width - min(2, width)) + "|"),
'-',
- ).truncate(width).to_owned(),
+ ).truncate(width).into(),
}
}
}
continue;
}
}
- self.words.push(ch.to_owned());
+ self.words.push(ch.into());
}
}
} else {
first_line.clone()
};
- vec! { result.truncate(width).to_owned() }
+ vec! { result.truncate(width).into() }
}
}
"Visibility: direct",
" rrrrrr"),
};
- vec! { line.truncate(width).to_owned() }
+ vec! { line.truncate(width).into() }
}
}
if rendered_para.len() > 2 {
vec! {
rendered_para[0].clone(),
- rendered_para[1].truncate(width-3).to_owned() +
+ rendered_para[1].truncate(width-3) +
ColouredString::plain("..."),
}
} else {
-> Vec<ColouredString>
{
let mut lines: Vec<_> = ColouredString::uniform(&self.url, 'M')
- .split(width.saturating_sub(1)).map(|x| x.to_owned()).collect();
+ .split(width.saturating_sub(1)).map(|x| x.into()).collect();
for para in &self.description {
lines.extend_from_slice(¶.render(width));
}
&self.keypress.description;
vec! {
- line.truncate(width).to_owned()
+ line.truncate(width).into()
}
}
}
// Trim 3 spaces off, leaving one after the colon
let rval = ColouredString::general(&rval.text()[3..],
&rval.colours()[3..]);
- lines.push(rkey[0].to_owned() + &rval);
+ lines.push(&rkey[0] + &rval);
} else {
push_fragment(&mut lines, rkey);
push_fragment(&mut lines, rval);