mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Remove some dead code.
This commit is contained in:
parent
1a8692df11
commit
cc683fddc3
@ -782,9 +782,6 @@ impl LocalFingerprint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
struct MtimeSlot(Mutex<Option<FileTime>>);
|
|
||||||
|
|
||||||
impl Fingerprint {
|
impl Fingerprint {
|
||||||
fn new() -> Fingerprint {
|
fn new() -> Fingerprint {
|
||||||
Fingerprint {
|
Fingerprint {
|
||||||
@ -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 {
|
impl DepFingerprint {
|
||||||
fn new(cx: &mut Context<'_, '_>, parent: &Unit, dep: &UnitDep) -> CargoResult<DepFingerprint> {
|
fn new(cx: &mut Context<'_, '_>, parent: &Unit, dep: &UnitDep) -> CargoResult<DepFingerprint> {
|
||||||
let fingerprint = calculate(cx, &dep.unit)?;
|
let fingerprint = calculate(cx, &dep.unit)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user