diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-11 12:52:46 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-11 13:05:57 +0100 |
| commit | df1660b1b78b5881c64c6fadd4ae12c8c01c6684 (patch) | |
| tree | 044bcfc85d3cffe3ede73e1285cacaf30aaa981d /src/lib | |
| parent | db17699af4b0ec839b8340766aab91bacf974cd4 (diff) | |
refactor: fix fmt and clippy issues
which potentially were only identified when a dependancy was updated
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/client.rs | 2 | ||||
| -rw-r--r-- | src/lib/git/mod.rs | 6 | ||||
| -rw-r--r-- | src/lib/git_events.rs | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/client.rs b/src/lib/client.rs index c29d4b9..455725c 100644 --- a/src/lib/client.rs +++ b/src/lib/client.rs | |||
| @@ -145,7 +145,7 @@ impl Connect for Client { | |||
| 145 | Client { | 145 | Client { |
| 146 | client: nostr_sdk::ClientBuilder::new() | 146 | client: nostr_sdk::ClientBuilder::new() |
| 147 | .opts(Options::new().relay_limits(RelayLimits::disable())) | 147 | .opts(Options::new().relay_limits(RelayLimits::disable())) |
| 148 | .signer(&opts.keys.unwrap_or(nostr::Keys::generate())) | 148 | .signer(opts.keys.unwrap_or(nostr::Keys::generate())) |
| 149 | // .database( | 149 | // .database( |
| 150 | // SQLiteDatabase::open(get_dirs()?.cache_dir().join("nostr-cache.sqlite")). | 150 | // SQLiteDatabase::open(get_dirs()?.cache_dir().join("nostr-cache.sqlite")). |
| 151 | // await?, ) | 151 | // await?, ) |
diff --git a/src/lib/git/mod.rs b/src/lib/git/mod.rs index 72717f7..00d84f6 100644 --- a/src/lib/git/mod.rs +++ b/src/lib/git/mod.rs | |||
| @@ -685,11 +685,7 @@ impl RepoActions for Repo { | |||
| 685 | /// setting global to None will suppliment local config with global items | 685 | /// setting global to None will suppliment local config with global items |
| 686 | /// not in local | 686 | /// not in local |
| 687 | fn get_git_config_item(&self, item: &str, global: Option<bool>) -> Result<Option<String>> { | 687 | fn get_git_config_item(&self, item: &str, global: Option<bool>) -> Result<Option<String>> { |
| 688 | let just_global = if let Some(just_global) = global { | 688 | let just_global = global.unwrap_or(false); |
| 689 | just_global | ||
| 690 | } else { | ||
| 691 | false | ||
| 692 | }; | ||
| 693 | match if just_global { | 689 | match if just_global { |
| 694 | self.git_repo | 690 | self.git_repo |
| 695 | .config() | 691 | .config() |
diff --git a/src/lib/git_events.rs b/src/lib/git_events.rs index 2e9f797..b4ac676 100644 --- a/src/lib/git_events.rs +++ b/src/lib/git_events.rs | |||
| @@ -249,7 +249,7 @@ pub fn event_tag_from_nip19_or_hex( | |||
| 249 | loop { | 249 | loop { |
| 250 | if bech32.is_empty() { | 250 | if bech32.is_empty() { |
| 251 | bech32 = Interactor::default().input( | 251 | bech32 = Interactor::default().input( |
| 252 | PromptInputParms::default().with_prompt(&format!("{reference_name} reference")), | 252 | PromptInputParms::default().with_prompt(format!("{reference_name} reference")), |
| 253 | )?; | 253 | )?; |
| 254 | } | 254 | } |
| 255 | if let Ok(nip19) = Nip19::from_bech32(bech32.clone()) { | 255 | if let Ok(nip19) = Nip19::from_bech32(bech32.clone()) { |