@@ -63,12 +63,12 @@ pub fn get_language(name: &str) -> Result<Language> {
6363 library_path.set_extension(DYLIB_EXTENSION);
6464
6565 let library = unsafe { Library::new(&library_path) }
66− .with_context(|| format!("Error opening dynamic library {library_path:?}"))?;
66+ .with_context(|| format!("Error opening dynamic library {:?}", library_path))?;
6767 let language_fn_name = format!("tree_sitter_{}", name.replace('-', "_"));
6868 let language = unsafe {
6969 let language_fn: Symbol<unsafe extern "C" fn() -> Language> = library
7070 .get(language_fn_name.as_bytes())
71− .with_context(|| format!("Failed to load symbol {language_fn_name}"))?;
71+ .with_context(|| format!("Failed to load symbol {}", language_fn_name))?;
7272 language_fn()
7373 };
7474 std::mem::forget(library);
@@ -133,7 +133,7 @@ where
133133 // TODO: print all failures instead of the first one found.
134134 rx.iter()
135135 .find(|result| result.is_err())
136− .map(|err| err.with_context(|| format!("Failed to {action} some grammar(s)")))
136+ .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
137137 .unwrap_or(Ok(()))
138138}
139139
@@ -238,12 +238,16 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
238238 };
239239
240240 let grammar_dir_entries = grammar_dir.read_dir().with_context(|| {
241− format!("Failed to read directory {grammar_dir:?}. Did you use 'hx --grammar fetch'?")
241+ format!(
242+ "Failed to read directory {:?}. Did you use 'hx --grammar fetch'?",
243+ grammar_dir
244+ )
242245 })?;
243246
244247 if grammar_dir_entries.count() == 0 {
245248 return Err(anyhow!(
246− "Directory {grammar_dir:?} is empty. Did you use 'hx --grammar fetch'?"
249+ "Directory {:?} is empty. Did you use 'hx --grammar fetch'?",
250+ grammar_dir
247251 ));
248252 };
249253