diff options
author | sharkdp <davidpeter@web.de> | 2020-03-21 20:36:00 +0100 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2020-03-21 22:21:23 +0100 |
commit | acf51bd7b3fdec64b1e5fe77fa09260135dadcbd (patch) | |
tree | bcfeccc7ecb63136ea49a6316a9b11678bd0c6b6 /src/assets.rs | |
parent | 83dc13a86d4ddc00be23e22f81843bf025517c08 (diff) |
Rename methods and parameters
Diffstat (limited to 'src/assets.rs')
-rw-r--r-- | src/assets.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/assets.rs b/src/assets.rs index 203ae39b..d1a89735 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -23,13 +23,13 @@ impl HighlightingAssets { "Monokai Extended" } - pub fn from_files(source_dir: &Path, start_empty: bool) -> Result<Self> { - let mut theme_set = if start_empty { + pub fn from_files(source_dir: &Path, include_integrated_assets: bool) -> Result<Self> { + let mut theme_set = if include_integrated_assets { + Self::get_integrated_themeset() + } else { ThemeSet { themes: BTreeMap::new(), } - } else { - Self::get_integrated_themeset() }; let theme_dir = source_dir.join("themes"); @@ -42,7 +42,7 @@ impl HighlightingAssets { ); } - let mut syntax_set_builder = if start_empty { + let mut syntax_set_builder = if !include_integrated_assets { let mut builder = SyntaxSetBuilder::new(); builder.add_plain_text_syntax(); builder @@ -112,7 +112,7 @@ impl HighlightingAssets { } } - pub fn save(&self, target_dir: &Path) -> Result<()> { + pub fn save_to_cache(&self, target_dir: &Path) -> Result<()> { let _ = fs::create_dir_all(target_dir); let theme_set_path = target_dir.join("themes.bin"); let syntax_set_path = target_dir.join("syntaxes.bin"); |