Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix clippy warnings
Browse files Browse the repository at this point in the history
Fingel committed Oct 15, 2024
1 parent 8810b45 commit edddc70
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gnome_search_provider/src/main.rs
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ use zeroize::Zeroize;
default_path = "/org/freedesktop/Notifications"
)]
trait Notifications {
#[allow(clippy::too_many_arguments)]
fn notify(
&self,
app_name: &str,
@@ -29,7 +30,7 @@ fn copy_to_clipbard(content: &String) {
thread::spawn(|| {
thread::sleep(time::Duration::from_secs(40));
let mut clipboard = Clipboard::new().unwrap();
clipboard.set_text(&String::new()).unwrap();
clipboard.set_text(String::new()).unwrap();
});
}

@@ -59,10 +60,7 @@ struct Application {
impl SearchProviderImpl for Application {
fn activate_result(&self, identifier: ResultID, terms: &[String], _timestamp: u32) {
let passwords = self.password_store.all_passwords().unwrap_or_default();
if let Some(password) = passwords
.iter()
.find(|entry| entry.name == identifier.to_owned())
{
if let Some(password) = passwords.iter().find(|entry| entry.name == identifier) {
if terms[0] == "otp" {
let mut otp = match password.mfa(&self.password_store) {
Ok(otp) => otp,

0 comments on commit edddc70

Please sign in to comment.