@@ -57,10 +57,7 @@ impl HighlightingAssets {
5757 )
5858 })?;
5959 let mut syntax_set: SyntaxSet = from_reader(syntax_set_file).map_err(|_| {
60− io::Error::new(
61− io::ErrorKind::Other,
62− format!("Could not parse cached syntax set"),
63− )
60+ io::Error::new(io::ErrorKind::Other, "Could not parse cached syntax set")
6461 })?;
6562 syntax_set.link_syntaxes();
6663
@@ -70,12 +67,8 @@ impl HighlightingAssets {
7067 theme_set_path.to_string_lossy()
7168 )
7269 })?;
73− let theme_set: ThemeSet = from_reader(theme_set_file).map_err(|_| {
74− io::Error::new(
75− io::ErrorKind::Other,
76− format!("Could not parse cached theme set"),
77− )
78− })?;
70+ let theme_set: ThemeSet = from_reader(theme_set_file)
71+ .map_err(|_| io::Error::new(io::ErrorKind::Other, "Could not parse cached theme set"))?;
7972
8073 Ok(HighlightingAssets {
8174 syntax_set,
@@ -134,12 +127,10 @@ impl HighlightingAssets {
134127 }
135128
136129 pub fn default_theme(&self) -> Result<&Theme> {
137− Ok(self.theme_set.themes.get("Default").ok_or_else(|| {
138− io::Error::new(
139− io::ErrorKind::Other,
140− format!("Could not find 'Default' theme"),
141− )
142− })?)
130+ Ok(self.theme_set
131+ .themes
132+ .get("Default")
133+ .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Could not find 'Default' theme"))?)
143134 }
144135}
145136