Skip to content

Commit 4a9a64c

Browse files
committed
Fix Clippy warnings
1 parent f956b84 commit 4a9a64c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/spirv-builder/src/watch.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
use crate::{SpirvBuilder, SpirvBuilderError, leaf_deps};
22
use notify::{Event, RecommendedWatcher, RecursiveMode, Watcher};
33
use rustc_codegen_spirv_types::CompileResult;
4-
use std::sync::mpsc::TrySendError;
54
use std::{
65
collections::HashSet,
76
path::PathBuf,
8-
sync::mpsc::{Receiver, sync_channel},
7+
sync::mpsc::{Receiver, TrySendError, sync_channel},
98
};
109

1110
impl SpirvBuilder {
@@ -50,11 +49,9 @@ impl SpirvWatcher {
5049
| notify::EventKind::Modify(_)
5150
| notify::EventKind::Remove(_)
5251
| notify::EventKind::Other => match tx.try_send(()) {
53-
Ok(_) => (),
5452
// disconnect is fine, SpirvWatcher is currently dropping
55-
Err(TrySendError::Disconnected(_)) => (),
5653
// full is fine, we just need to send a single event anyway
57-
Err(TrySendError::Full(_)) => (),
54+
Ok(_) | Err(TrySendError::Disconnected(_) | TrySendError::Full(_)) => {}
5855
},
5956
notify::EventKind::Access(_) => {}
6057
},
@@ -81,7 +78,9 @@ impl SpirvWatcher {
8178
return self.recv_first_result();
8279
}
8380

84-
self.rx.recv().map_err(|_| SpirvWatcherError::WatcherDied)?;
81+
self.rx
82+
.recv()
83+
.map_err(|_err| SpirvWatcherError::WatcherDied)?;
8584
let metadata_file = crate::invoke_rustc(&self.builder)?;
8685
let result = self.builder.parse_metadata_file(&metadata_file)?;
8786

@@ -100,7 +99,9 @@ impl SpirvWatcher {
10099
.watch(watch_path, RecursiveMode::Recursive)
101100
.map_err(SpirvWatcherError::NotifyFailed)?;
102101
let path = loop {
103-
self.rx.recv().map_err(|_| SpirvWatcherError::WatcherDied)?;
102+
self.rx
103+
.recv()
104+
.map_err(|_err| SpirvWatcherError::WatcherDied)?;
104105
match crate::invoke_rustc(&self.builder) {
105106
Ok(path) => break path,
106107
Err(err) => log::error!("{err}"),

examples/runners/wgpu/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272

7373
use clap::Parser;
7474
use clap::ValueEnum;
75-
use spirv_builder::SpirvBuilderError;
7675
use std::borrow::Cow;
7776
use strum::{Display, EnumString};
7877

0 commit comments

Comments
 (0)