Skip to content

Commit 725d5a3

Browse files
committed
fix lints
1 parent 83f8c24 commit 725d5a3

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

ntfy-daemon/src/credentials.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::cell::{Cell, RefCell};
1+
use std::cell::RefCell;
22
use std::collections::HashMap;
33
use std::rc::Rc;
44

ntfy-daemon/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pub mod ntfy_capnp {
88
include!(concat!(env!("OUT_DIR"), "/src/ntfy_capnp.rs"));
99
}
1010

11-
use std::rc::Rc;
1211
use std::sync::Arc;
1312

1413
#[derive(Clone)]

ntfy-daemon/src/system_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::cell::{Cell, OnceCell, RefCell};
1+
use std::cell::{Cell, RefCell};
22
use std::ops::ControlFlow;
33
use std::rc::{Rc, Weak};
44
use std::sync::Arc;
@@ -20,7 +20,7 @@ use crate::SharedEnv;
2020
use crate::{
2121
message_repo::Db,
2222
models::{self, MinMessage},
23-
ntfy_capnp::{account, output_channel, subscription, system_notifier, watch_handle, Status},
23+
ntfy_capnp::{output_channel, subscription, system_notifier, watch_handle, Status},
2424
topic_listener::{build_client, TopicListener},
2525
};
2626

ntfy-daemon/src/topic_listener.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use std::collections::HashMap;
21
use std::ops::ControlFlow;
32
use std::sync::Arc;
43
use std::time::Duration;
54

65
use futures::prelude::*;
7-
use reqwest::header::HeaderValue;
86
use serde::{Deserialize, Serialize};
97
use tokio::io::AsyncBufReadExt;
108
use tokio::sync::mpsc;

src/application.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl NotifyApplication {
133133
})
134134
.build();
135135

136-
let action_about = gio::ActionEntry::builder("preferences")
136+
let action_preferences = gio::ActionEntry::builder("preferences")
137137
.activate(|app: &Self, _, _| {
138138
app.show_preferences();
139139
})
@@ -156,7 +156,12 @@ impl NotifyApplication {
156156
app.handle_message_action(action);
157157
})
158158
.build();
159-
self.add_action_entries([action_quit, action_about, message_action]);
159+
self.add_action_entries([
160+
action_quit,
161+
action_about,
162+
action_preferences,
163+
message_action,
164+
]);
160165
}
161166

162167
fn handle_message_action(&self, action: models::Action) {

src/widgets/preferences.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
use std::cell::Cell;
21
use std::cell::OnceCell;
32

43
use adw::prelude::*;
54
use adw::subclass::prelude::*;
6-
use futures::prelude::*;
75
use gtk::{gio, glib};
8-
use ntfy_daemon::models;
9-
use ntfy_daemon::ntfy_capnp::{system_notifier, Status};
10-
use tracing::warn;
6+
use ntfy_daemon::ntfy_capnp::system_notifier;
117

12-
use crate::application::NotifyApplication;
13-
use crate::config::{APP_ID, PROFILE};
14-
use crate::subscription::Subscription;
158
use crate::widgets::*;
169

1710
mod imp {
@@ -157,7 +150,7 @@ impl NotifyPreferences {
157150
acc.set_server(server[..].into());
158151
req.get().set_password(password[..].into());
159152

160-
let res = req.send().promise.await?;
153+
req.send().promise.await?;
161154

162155
self.show_accounts().await?;
163156

0 commit comments

Comments
 (0)