@@ -27,13 +27,12 @@ mod printer;
2727mod style;
2828mod terminal;
2929
30−use std::fs;
3130use std::io;
3231use std::path::Path;
3332use std::process;
3433
3534use app::App;
36−use assets::{config_dir, syntax_set_path, theme_set_path, HighlightingAssets};
35+use assets::{clear_assets, config_dir, HighlightingAssets};
3736use features::{list_languages, print_files};
3837
3938mod errors {
@@ -75,13 +74,7 @@ fn run() -> Result<bool> {
7574 let assets = HighlightingAssets::from_files(source_dir)?;
7675 assets.save(target_dir)?;
7776 } else if cache_matches.is_present("clear") {
78− print!("Clearing theme set cache ... ");
79− fs::remove_file(theme_set_path()).ok();
80− println!("okay");
81−
82− print!("Clearing syntax set cache ... ");
83− fs::remove_file(syntax_set_path()).ok();
84− println!("okay");
77+ clear_assets();
8578 } else if cache_matches.is_present("config-dir") {
8679 println!("{}", config_dir());
8780 }