diff options
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, +} + |