diff options
author | Toby Vincent <tobyv13@gmail.com> | 2022-11-03 16:47:57 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2022-11-03 16:47:57 -0500 |
commit | c81eb9a1a542cc058960cf4eab12fc70bc2a81eb (patch) | |
tree | 8deff281230dbdedea29299060e214f1bb685cf7 /src/finder | |
parent | 53d0cefcb1ca3527935479cc07a6f5fe5b1f8051 (diff) |
feat: impl finder
Diffstat (limited to 'src/finder')
-rw-r--r-- | src/finder/config.rs | 2 | ||||
-rw-r--r-- | src/finder/error.rs | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/finder/config.rs b/src/finder/config.rs index cb24b5c..bc39556 100644 --- a/src/finder/config.rs +++ b/src/finder/config.rs @@ -1,7 +1,7 @@ use figment::{providers::Serialized, value, Figment, Metadata, Profile, Provider}; use serde::{Deserialize, Serialize}; -#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] pub struct Config { pub program: String, pub args: Vec<String>, diff --git a/src/finder/error.rs b/src/finder/error.rs new file mode 100644 index 0000000..46d39c4 --- /dev/null +++ b/src/finder/error.rs @@ -0,0 +1,11 @@ +pub type Result<T> = std::result::Result<T, Error>; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + #[error("IO error: {0:?}")] + IO(#[from] std::io::Error), + + #[error("Stdin error: Failed to get finder's stdin")] + Stdin, +} + |