diff --git a/src/assets.rs b/src/assets.rs index bd5741f..c6e21be 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -4,7 +4,7 @@ use crate::directories::PROJECT_DIRS; use anyhow::Result; use syntect::dumps; use syntect::highlighting::ThemeSet; -use syntect::parsing::{SyntaxSet}; +use syntect::parsing::SyntaxSet; const DEFAULT_SYNTAXSET: &'static [u8] = include_bytes!("../assets/syntaxes.bin"); const DEFAULT_THEMESET: &'static [u8] = include_bytes!("../assets/themes.bin"); @@ -32,11 +32,8 @@ impl HighlightingAssets { pub fn add_from_folder>(&mut self, path: P) -> Result<()> { let path = path.as_ref(); - self.theme_set - .add_from_folder(path.join("themes"))?; - let mut builder = self.syntax_set - .clone() - .into_builder(); + self.theme_set.add_from_folder(path.join("themes"))?; + let mut builder = self.syntax_set.clone().into_builder(); builder.add_from_folder(path.join("syntaxes"), true)?; self.syntax_set = builder.build(); Ok(()) diff --git a/src/bin/silicon/config.rs b/src/bin/silicon/config.rs index 083876c..93d3532 100644 --- a/src/bin/silicon/config.rs +++ b/src/bin/silicon/config.rs @@ -201,7 +201,6 @@ pub struct Config { // Draw a custom text on the bottom right corner // #[structopt(long)] // watermark: Option, - /// build syntax definition and theme cache #[structopt(long)] pub build_cache: Option, diff --git a/src/bin/silicon/main.rs b/src/bin/silicon/main.rs index 8f8e2e0..e87827c 100644 --- a/src/bin/silicon/main.rs +++ b/src/bin/silicon/main.rs @@ -88,7 +88,7 @@ fn run() -> Result<(), Error> { let mut ha = HighlightingAssets::new(); ha.add_from_folder(path)?; ha.dump_to_file()?; - return Ok(()) + return Ok(()); } else if config.list_themes { for i in ts.themes.keys() { println!("{}", i);