mirror of
https://github.com/FliegendeWurst/ripgrep-all.git
synced 2024-11-24 12:24:56 +00:00
format
This commit is contained in:
parent
42fe225373
commit
be0b78a072
@ -52,7 +52,12 @@ async fn choose_adapter(
|
|||||||
Ok(adapter.map(|e| (e.0, e.1, active_adapters)))
|
Ok(adapter.map(|e| (e.0, e.1, active_adapters)))
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn buf_choose_adapter(ai: AdaptInfo) -> Result<(AdaptInfo, Option<(Arc<dyn FileAdapter>, FileMatcher, ActiveAdapters)>)> {
|
async fn buf_choose_adapter(
|
||||||
|
ai: AdaptInfo,
|
||||||
|
) -> Result<(
|
||||||
|
AdaptInfo,
|
||||||
|
Option<(Arc<dyn FileAdapter>, FileMatcher, ActiveAdapters)>,
|
||||||
|
)> {
|
||||||
let mut inp = BufReader::with_capacity(1 << 16, ai.inp);
|
let mut inp = BufReader::with_capacity(1 << 16, ai.inp);
|
||||||
let adapter = choose_adapter(
|
let adapter = choose_adapter(
|
||||||
&ai.config,
|
&ai.config,
|
||||||
@ -111,12 +116,7 @@ pub async fn rga_preproc(ai: AdaptInfo) -> Result<ReadBox> {
|
|||||||
return handle_no_adapter(ai).map(|ai| ai.inp);
|
return handle_no_adapter(ai).map(|ai| ai.inp);
|
||||||
};
|
};
|
||||||
let path_hint_copy = ai.filepath_hint.clone();
|
let path_hint_copy = ai.filepath_hint.clone();
|
||||||
adapt_caching(
|
adapt_caching(ai, adapter, detection_reason, active_adapters)
|
||||||
ai,
|
|
||||||
adapter,
|
|
||||||
detection_reason,
|
|
||||||
active_adapters,
|
|
||||||
)
|
|
||||||
.await
|
.await
|
||||||
.with_context(|| format!("run_adapter({})", &path_hint_copy.to_string_lossy()))
|
.with_context(|| format!("run_adapter({})", &path_hint_copy.to_string_lossy()))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user