@@ -54,7 +54,7 @@ impl HighlightingAssets {
5454
5555 pub fn from_files(source_dir: &Path, include_integrated_assets: bool) -> Result<Self> {
5656 let mut theme_set = if include_integrated_assets {
57− Self::get_integrated_themeset()
57+ get_integrated_themeset()
5858 } else {
5959 ThemeSet {
6060 themes: BTreeMap::new(),
@@ -83,7 +83,7 @@ impl HighlightingAssets {
8383 builder.add_plain_text_syntax();
8484 builder
8585 } else {
86− Self::get_integrated_syntaxset().into_builder()
86+ get_integrated_syntaxset().into_builder()
8787 };
8888
8989 let syntax_dir = source_dir.join("syntaxes");
@@ -109,19 +109,8 @@ impl HighlightingAssets {
109109 ))
110110 }
111111
112− fn get_integrated_syntaxset() -> SyntaxSet {
113− from_binary(include_bytes!("../assets/syntaxes.bin"))
114− }
115−
116− fn get_integrated_themeset() -> ThemeSet {
117− from_binary(include_bytes!("../assets/themes.bin"))
118− }
119−
120112 pub fn from_binary() -> Self {
121− HighlightingAssets::new(
122− Self::get_integrated_syntaxset(),
123− Self::get_integrated_themeset(),
124− )
113+ HighlightingAssets::new(get_integrated_syntaxset(), get_integrated_themeset())
125114 }
126115
127116 pub fn save_to_cache(&self, target_dir: &Path, current_version: &str) -> Result<()> {
@@ -327,6 +316,14 @@ impl HighlightingAssets {
327316 }
328317}
329318
319+fn get_integrated_syntaxset() -> SyntaxSet {
320+ from_binary(include_bytes!("../assets/syntaxes.bin"))
321+}
322+
323+fn get_integrated_themeset() -> ThemeSet {
324+ from_binary(include_bytes!("../assets/themes.bin"))
325+}
326+
330327fn asset_to_cache<T: serde::Serialize>(asset: &T, path: &Path, description: &str) -> Result<()> {
331328 print!("Writing {} to {} ... ", description, path.to_string_lossy());
332329 dump_to_file(asset, &path).chain_err(|| {