diff options
| author | Mica White <botahamec@outlook.com> | 2026-03-28 20:58:17 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-03-28 20:59:55 -0400 |
| commit | 766ef91c4b4226a645583eff311d2868cab28bc0 (patch) | |
| tree | 6aa86b5a7aa124a2447db4bc0726a64b0cc10c6f | |
| parent | 6d73f96706814e58d03761ae997972a6551c081e (diff) | |
Allow init in autosave
| -rw-r--r-- | src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -39,6 +39,7 @@ * - allow force */ +use std::collections::HashSet; use std::fs::Metadata; use std::path::{Path, PathBuf}; @@ -50,7 +51,7 @@ use uuid::Uuid; #[derive(Default, Serialize, Deserialize)] pub struct Config { - repositories: Vec<PathBuf>, + repositories: HashSet<PathBuf>, } #[derive(Debug, Error)] @@ -79,7 +80,7 @@ pub fn init(repository: &Repository, config: Option<&mut Config>) -> Result<(), if let Some(config) = config && let Some(workdir) = workdir { - config.repositories.push(workdir.into()); + config.repositories.insert(workdir.into()); } Ok(()) |
