nix fmt + rustfmt sweep

This commit is contained in:
müde 2026-05-17 01:40:28 +02:00
parent 0cf120e9e9
commit 411cf86632
16 changed files with 171 additions and 133 deletions

View file

@ -23,15 +23,19 @@ const HISTORY_CAPACITY: usize = 2000;
/// Path to the persisted event db. Overridable via `HYPERHIVE_EVENTS_DB`
/// for dev / tests; otherwise derived from the agent's state dir.
fn events_db_path() -> PathBuf {
std::env::var_os("HYPERHIVE_EVENTS_DB")
.map_or_else(|| crate::paths::state_dir().join("hyperhive-events.sqlite"), PathBuf::from)
std::env::var_os("HYPERHIVE_EVENTS_DB").map_or_else(
|| crate::paths::state_dir().join("hyperhive-events.sqlite"),
PathBuf::from,
)
}
/// Path to the persisted model file. Overridable via `HYPERHIVE_MODEL_FILE`
/// for dev / tests; otherwise derived from the agent's state dir.
fn model_file_path() -> PathBuf {
std::env::var_os("HYPERHIVE_MODEL_FILE")
.map_or_else(|| crate::paths::state_dir().join("hyperhive-model"), PathBuf::from)
std::env::var_os("HYPERHIVE_MODEL_FILE").map_or_else(
|| crate::paths::state_dir().join("hyperhive-model"),
PathBuf::from,
)
}
fn load_model() -> Option<String> {