Skip to content

Commit a7cbda9

Browse files
New Rust, New Clippy..
1 parent 0c98210 commit a7cbda9

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

audio/src/recorder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl BufferedRecorder {
166166
// Update the timer for next poll regardless..
167167
now = Instant::now();
168168

169-
if self.producers.lock().unwrap().len() > 0 {
169+
if !self.producers.lock().unwrap().is_empty() {
170170
// Something is actively recording, don't break the loop..
171171
continue;
172172
}

daemon/src/platform/linux/sleep.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ pub async fn run(tx: mpsc::Sender<EventTriggers>, mut stop: Shutdown) -> Result<
6565
let session_proxy = if let Ok(value) = env::var("XDG_SESSION_ID") {
6666
if let Ok(session) = manager.get_session(&value).await {
6767
if let Ok(builder) = SessionProxy::builder(&conn).path(session) {
68-
if let Ok(proxy) = builder.build().await {
69-
Some(proxy)
70-
} else {
71-
None
72-
}
68+
builder.build().await.ok()
7369
} else {
7470
None
7571
}

0 commit comments

Comments
 (0)