on master help sign in
Small style changes to --list-themes
commitfd2b376ea0f6b0edb4d117e23e18cd19737abc92 authorsharkdp <davidpeter@web.de> dateTue 28 Aug 2018, 19:48 (8 years ago) parentcda54e4
2 files changed+7−7
assets/theme_preview.rs+5−5 src/main.rs+2−2
assets/theme_preview.rs+5−5
@@ -1,5 +1,5 @@
1−// Output the square of a number.
2−fn print_square(num: f64) {
3− let result = f64::powf(num, 2.0);
4− println!("The square of {:.2} is {:.2}.", num, result);
5−}
1+ // Output the square of a number.
2+ fn print_square(num: f64) {
3+ let result = f64::powf(num, 2.0);
4+ println!("The square of {:.2} is {:.2}.", num, result);
5+ }
src/main.rs+2−2
@@ -139,10 +139,10 @@ pub fn list_themes(assets: &HighlightingAssets, cfg: &Config) {
139139 config.files = vec![Some("assets/theme_preview.rs")];
140140 config.output_components = OutputComponents(style);
141141 for (theme, _) in themes.iter() {
142− println!("{}\n", Style::new().bold().paint(theme.to_string()));
142+ println!("Theme: {}\n", Style::new().bold().paint(theme.to_string()));
143143 config.theme = theme.to_string();
144144 let _controller = Controller::new(&config, &assets).run();
145− println!("--------------------------------\n");
145+ println!()
146146 }
147147}
148148