fix(loader): fix no-default-features build (#4505)
This commit is contained in:
parent
ffbe504242
commit
462fcd7c30
1 changed files with 4 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ use std::{
|
|||
ffi::{OsStr, OsString},
|
||||
fs,
|
||||
io::{BufRead, BufReader},
|
||||
marker::PhantomData,
|
||||
mem,
|
||||
path::{Path, PathBuf},
|
||||
process::Command,
|
||||
|
|
@ -18,7 +19,6 @@ use std::{
|
|||
time::SystemTime,
|
||||
};
|
||||
|
||||
#[cfg(any(feature = "tree-sitter-highlight", feature = "tree-sitter-tags"))]
|
||||
use anyhow::Error;
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use etcetera::BaseStrategy as _;
|
||||
|
|
@ -327,6 +327,7 @@ pub struct LanguageConfiguration<'a> {
|
|||
highlight_names: &'a Mutex<Vec<String>>,
|
||||
#[cfg(feature = "tree-sitter-highlight")]
|
||||
use_all_highlight_names: bool,
|
||||
_phantom: PhantomData<&'a ()>,
|
||||
}
|
||||
|
||||
pub struct Loader {
|
||||
|
|
@ -1214,6 +1215,7 @@ impl Loader {
|
|||
highlight_names: &self.highlight_names,
|
||||
#[cfg(feature = "tree-sitter-highlight")]
|
||||
use_all_highlight_names: self.use_all_highlight_names,
|
||||
_phantom: PhantomData,
|
||||
};
|
||||
|
||||
for file_type in &configuration.file_types {
|
||||
|
|
@ -1283,6 +1285,7 @@ impl Loader {
|
|||
highlight_names: &self.highlight_names,
|
||||
#[cfg(feature = "tree-sitter-highlight")]
|
||||
use_all_highlight_names: self.use_all_highlight_names,
|
||||
_phantom: PhantomData,
|
||||
};
|
||||
self.language_configurations.push(unsafe {
|
||||
mem::transmute::<LanguageConfiguration<'_>, LanguageConfiguration<'static>>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue