From df1660b1b78b5881c64c6fadd4ae12c8c01c6684 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 11 Sep 2024 12:52:46 +0100 Subject: refactor: fix fmt and clippy issues which potentially were only identified when a dependancy was updated --- src/lib/client.rs | 2 +- src/lib/git/mod.rs | 6 +----- src/lib/git_events.rs | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/lib') 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 { Client { client: nostr_sdk::ClientBuilder::new() .opts(Options::new().relay_limits(RelayLimits::disable())) - .signer(&opts.keys.unwrap_or(nostr::Keys::generate())) + .signer(opts.keys.unwrap_or(nostr::Keys::generate())) // .database( // SQLiteDatabase::open(get_dirs()?.cache_dir().join("nostr-cache.sqlite")). // 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 { /// setting global to None will suppliment local config with global items /// not in local fn get_git_config_item(&self, item: &str, global: Option) -> Result> { - let just_global = if let Some(just_global) = global { - just_global - } else { - false - }; + let just_global = global.unwrap_or(false); match if just_global { self.git_repo .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( loop { if bech32.is_empty() { bech32 = Interactor::default().input( - PromptInputParms::default().with_prompt(&format!("{reference_name} reference")), + PromptInputParms::default().with_prompt(format!("{reference_name} reference")), )?; } if let Ok(nip19) = Nip19::from_bech32(bech32.clone()) { -- cgit v1.2.3