Using slice notation instead of as_ref
commita13eb60df3ccec603fe55524a9a411494b1153bf
authorTA Thanh Dinh <tathanhdinh@gmail.com>
dateThu 24 May 2018, 14:38 (8 years ago)
parent9342d0b
src/features.rs+1−1
@@ -47,7 +47,7 @@ pub fn list_languages(assets: &HighlightingAssets, term_width: usize) {
4747 }
4848
4949 num_chars += new_chars;
50− print!("{}", Green.paint(word.as_ref()));
50+ print!("{}", Green.paint(&word[..]));
5151 if extension.peek().is_some() {
5252 print!("{}", comma_separator);
5353 }