summaryrefslogtreecommitdiff
path: root/src/core.rs
diff options
context:
space:
mode:
authorRosyid Haryadi <rosyid_haryadi@protonmail.com>2025-03-12 12:46:19 +0700
committerRosyid Haryadi <rosyid_haryadi@protonmail.com>2025-03-12 12:46:19 +0700
commit79c761f4fc61fbe05bd17ad473d324e052b5db62 (patch)
treef9dfb2677cc75b0b575caf4776c6f240e85f6ec2 /src/core.rs
parent97df39d49a5a9792818293dd85bd0458c35261ab (diff)
type alias for config
Diffstat (limited to 'src/core.rs')
-rw-r--r--src/core.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core.rs b/src/core.rs
index 1223bb7..be1edfb 100644
--- a/src/core.rs
+++ b/src/core.rs
@@ -3,6 +3,9 @@ use std::path::PathBuf;
use std::process;
use ini::ini;
+type ConfigHashMap = HashMap<String, HashMap<String, Option<String>>>;
+
+
pub struct GitRepository {
pub worktree: PathBuf,
gitdir: PathBuf,
@@ -17,7 +20,7 @@ fn die(msg: &str) {
impl GitRepository {
pub fn new(worktree: PathBuf) -> Self {
let gitdir = worktree.join(".git");
- let conf: HashMap<String, HashMap<String, Option<String>>> = HashMap::new();
+ let conf: ConfigHashMap = HashMap::new();
Self { worktree, gitdir, conf }
}