Move load_config onto Fennel as an associated function
https://claude.ai/code/session_01XT5wwGPe79qUX5gBkwCHQ4
change
commit f87911d2f19a38255d96c27aaf03802d5432173a
author Claude <noreply@anthropic.com>
date
parent 52d56900
diff --git a/quire-core/src/fennel.rs b/quire-core/src/fennel.rs
index b88b31f..58ab385 100644
--- a/quire-core/src/fennel.rs
+++ b/quire-core/src/fennel.rs
@@ -178,17 +178,17 @@ impl Fennel {
         let source = fs_err::read_to_string(path)?;
         self.load_string(&source, &path.display().to_string())
     }
-}
 
-/// Create a fresh Fennel VM and load `path` into `T`.
-///
-/// Convenience wrapper for callers that only need a one-shot config load
-/// and don't need to reuse the VM.
-pub fn load_config<T>(path: &Path) -> Result<T, FennelError>
-where
-    T: serde::de::DeserializeOwned,
-{
-    Fennel::new()?.load_file(path)
+    /// Create a fresh Fennel VM and load `path` into `T`.
+    ///
+    /// Convenience wrapper for callers that only need a one-shot config load
+    /// and don't need to reuse the VM.
+    pub fn load_config<T>(path: &Path) -> Result<T, FennelError>
+    where
+        T: serde::de::DeserializeOwned,
+    {
+        Self::new()?.load_file(path)
+    }
 }
 
 impl FennelError {
diff --git a/quire-server/src/quire/mod.rs b/quire-server/src/quire/mod.rs
index 70b8af7..0ce1b0a 100644
--- a/quire-server/src/quire/mod.rs
+++ b/quire-server/src/quire/mod.rs
@@ -10,6 +10,7 @@ use crate::ci::{Ci, Executor, Runs};
 use crate::{Error, Result as AppResult};
 pub use quire_core::telemetry::SentryConfig;
 
+use quire_core::fennel::Fennel;
 use quire_core::secret::SecretString;
 
 /// Parsed global configuration (`/var/quire/config.fnl`).
@@ -223,7 +224,7 @@ impl Quire {
         if !config_path.exists() {
             return Err(Error::ConfigNotFound(config_path.display().to_string()));
         }
-        Ok(quire_core::fennel::load_config(&config_path)?)
+        Ok(Fennel::load_config(&config_path)?)
     }
 
     /// Validate a repository name and return its resolved path.