Skip to content

Commit

Permalink
Remove some dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 5, 2021
1 parent 1a8692d commit cc683fd
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/cargo/core/compiler/fingerprint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,6 @@ impl LocalFingerprint {
}
}

#[derive(Debug)]
struct MtimeSlot(Mutex<Option<FileTime>>);

impl Fingerprint {
fn new() -> Fingerprint {
Fingerprint {
Expand Down Expand Up @@ -1153,37 +1150,6 @@ impl hash::Hash for Fingerprint {
}
}

impl hash::Hash for MtimeSlot {
fn hash<H: Hasher>(&self, h: &mut H) {
self.0.lock().unwrap().hash(h)
}
}

impl ser::Serialize for MtimeSlot {
fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
where
S: ser::Serializer,
{
self.0
.lock()
.unwrap()
.map(|ft| (ft.unix_seconds(), ft.nanoseconds()))
.serialize(s)
}
}

impl<'de> de::Deserialize<'de> for MtimeSlot {
fn deserialize<D>(d: D) -> Result<MtimeSlot, D::Error>
where
D: de::Deserializer<'de>,
{
let kind: Option<(i64, u32)> = de::Deserialize::deserialize(d)?;
Ok(MtimeSlot(Mutex::new(
kind.map(|(s, n)| FileTime::from_unix_time(s, n)),
)))
}
}

impl DepFingerprint {
fn new(cx: &mut Context<'_, '_>, parent: &Unit, dep: &UnitDep) -> CargoResult<DepFingerprint> {
let fingerprint = calculate(cx, &dep.unit)?;
Expand Down

0 comments on commit cc683fd

Please sign in to comment.