nix fmt + rustfmt sweep
This commit is contained in:
parent
0cf120e9e9
commit
411cf86632
16 changed files with 171 additions and 133 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue