Skip to content

Commit 764c479

Browse files
jschwesylvestre
authored andcommitted
Fix clippy lints for unused fields
Removed the filetime field, since it shouldn't have any side effects if it is never read. The ActiveInfo field must be kept however, since WaitUntilZero waits on the Arc. Signed-off-by: Jonathan Schwender <[email protected]>
1 parent 2d1e749 commit 764c479

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/compiler/rust.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ pub struct RustHasher {
115115
#[derive(Debug, Clone)]
116116
pub struct RustupProxy {
117117
proxy_executable: PathBuf,
118-
filetime: FileTime,
119118
}
120119

121120
#[derive(Debug, Clone, PartialEq)]
@@ -553,13 +552,8 @@ impl RustupProxy {
553552
where
554553
P: AsRef<Path>,
555554
{
556-
let filetime = fs::metadata(proxy_executable.as_ref())
557-
.map(|attr| FileTime::from_last_modification_time(&attr))?;
558555
let proxy_executable = proxy_executable.as_ref().to_owned();
559-
Ok(Self {
560-
proxy_executable,
561-
filetime,
562-
})
556+
Ok(Self { proxy_executable })
563557
}
564558

565559
pub async fn find_proxy_executable<T>(

src/server.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,8 @@ where
684684
tx: mpsc::Sender<ServerMessage>,
685685

686686
/// Information tracking how many services (connected clients) are active.
687+
/// This field causes [WaitUntilZero] to wait until this struct drops.
688+
#[allow(dead_code)]
687689
info: ActiveInfo,
688690
}
689691

@@ -1748,6 +1750,7 @@ struct WaitUntilZero {
17481750
}
17491751

17501752
#[derive(Clone)]
1753+
#[allow(dead_code)]
17511754
struct ActiveInfo {
17521755
info: Arc<Mutex<Info>>,
17531756
}

0 commit comments

Comments
 (0)