upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/mod.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 11:32:05 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 14:23:54 +0100
commit771f944af447c202eba045936a36dee71ab797ac (patch)
treee691de4ebc8dde7ac4855e139881ff923bc254ce /src/lib/mod.rs
parent949c6459aa7683453a7160423b689ceadb08954b (diff)
refactor: fix imports, etc based on restructure
move some functions out of ngit and into lib/mod and lib/git_events remove MockConnect from binaries so it is only used in the library. this was done: * mainly because automocks were not being imported from lib into each binary * but also because the these functions were being tested with MockConnect
Diffstat (limited to 'src/lib/mod.rs')
-rw-r--r--src/lib/mod.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/mod.rs b/src/lib/mod.rs
index 61dfc49..6e6f6fe 100644
--- a/src/lib/mod.rs
+++ b/src/lib/mod.rs
@@ -1,16 +1,16 @@
1mod cli_interactor; 1pub mod cli_interactor;
2mod client; 2pub mod client;
3mod config; 3pub mod git;
4mod git; 4pub mod git_events;
5mod key_handling; 5pub mod login;
6mod login; 6pub mod repo_ref;
7mod repo_ref; 7pub mod repo_state;
8mod repo_state;
9 8
10pub use client; 9use anyhow::{anyhow, Result};
11pub use config; 10use directories::ProjectDirs;
12pub use git; 11
13pub use key_handling; 12pub fn get_dirs() -> Result<ProjectDirs> {
14pub use login; 13 ProjectDirs::from("", "", "ngit").ok_or(anyhow!(
15pub use repo_ref; 14 "should find operating system home directories with rust-directories crate"
16pub use repo_state; 15 ))
16}