on master help sign in
Small style changes to --list-themes
fd2b376sharkdp
assets/theme_preview.rs+5−5
@@ -1,5 +1,5 @@
1−// Output the square of a number.
1+ // Output the square of a number.
2−fn print_square(num: f64) {
2+ fn print_square(num: f64) {
3− let result = f64::powf(num, 2.0);
3+ let result = f64::powf(num, 2.0);
4− println!("The square of {:.2} is {:.2}.", num, result);
4+ println!("The square of {:.2} is {:.2}.", num, result);
5−}
5+ }
src/main.rs+2−2
@@ -139,10 +139,10 @@ pub fn list_themes(assets: &HighlightingAssets, cfg: &Config) {
139 config.files = vec![Some("assets/theme_preview.rs")];
139 config.files = vec![Some("assets/theme_preview.rs")];
140 config.output_components = OutputComponents(style);
140 config.output_components = OutputComponents(style);
141 for (theme, _) in themes.iter() {
141 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()));
143 config.theme = theme.to_string();
143 config.theme = theme.to_string();
144 let _controller = Controller::new(&config, &assets).run();
144 let _controller = Controller::new(&config, &assets).run();
145− println!("--------------------------------\n");
145+ println!()
146 }
146 }
147}
147}
148
148