mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-30 19:51:58 -07:00
core: switch to anyhow
This commit adds `anyhow` as a dependency and switches over to it from Box<dyn Error>. It actually looks like I've kept all of my errors rather shallow, such that we don't get a huge benefit from anyhow at present. But now that anyhow is in use, I expect to use its "context" feature more going forward.
This commit is contained in:
@@ -119,7 +119,7 @@ impl SearchWorkerBuilder {
|
||||
pub fn preprocessor(
|
||||
&mut self,
|
||||
cmd: Option<PathBuf>,
|
||||
) -> crate::Result<&mut SearchWorkerBuilder> {
|
||||
) -> anyhow::Result<&mut SearchWorkerBuilder> {
|
||||
if let Some(ref prog) = cmd {
|
||||
let bin = cli::resolve_binary(prog)?;
|
||||
self.config.preprocessor = Some(bin);
|
||||
|
Reference in New Issue
Block a user