diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-04 11:32:05 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-04 14:23:54 +0100 |
| commit | 771f944af447c202eba045936a36dee71ab797ac (patch) | |
| tree | e691de4ebc8dde7ac4855e139881ff923bc254ce /src/lib/login/user.rs | |
| parent | 949c6459aa7683453a7160423b689ceadb08954b (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/login/user.rs')
| -rw-r--r-- | src/lib/login/user.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/lib/login/user.rs b/src/lib/login/user.rs index 547fe7e..46652db 100644 --- a/src/lib/login/user.rs +++ b/src/lib/login/user.rs | |||
| @@ -1,15 +1,7 @@ | |||
| 1 | use anyhow::{anyhow, Result}; | ||
| 2 | use directories::ProjectDirs; | ||
| 3 | use nostr::PublicKey; | 1 | use nostr::PublicKey; |
| 4 | use nostr_sdk::Timestamp; | 2 | use nostr_sdk::Timestamp; |
| 5 | use serde::{self, Deserialize, Serialize}; | 3 | use serde::{self, Deserialize, Serialize}; |
| 6 | 4 | ||
| 7 | pub fn get_dirs() -> Result<ProjectDirs> { | ||
| 8 | ProjectDirs::from("", "", "ngit").ok_or(anyhow!( | ||
| 9 | "should find operating system home directories with rust-directories crate" | ||
| 10 | )) | ||
| 11 | } | ||
| 12 | |||
| 13 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] | 5 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] |
| 14 | pub struct UserRef { | 6 | pub struct UserRef { |
| 15 | pub public_key: PublicKey, | 7 | pub public_key: PublicKey, |