From 075a2ee9213857bce65958e0b6191a5b8a6e6927 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sun, 6 Jul 2025 17:28:11 -0500 Subject: [PATCH] Scaffold the new config module --- src/config.rs | 19 +++++++++++++++++++ src/lib.rs | 1 + 2 files changed, 20 insertions(+) create mode 100644 src/config.rs diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..5126e85 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,19 @@ + +pub type Result = core::result::Result; + +#[derive(Debug)] +pub enum Error {} + +impl core::fmt::Display for Error{ + fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + // FIXME: Print a nice output, don't just reuse the Debug impl + write!(fmt, "{self:?}") + } +} + +impl std::error::Error for Error {} + +#[cfg(test)] +mod tests { + use super::*; +} \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 70a11a4..580c45d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize}; pub mod api; pub mod cli; +pub mod config; pub mod structs; #[derive(Debug, Deserialize, Serialize)]