Remove DepNodeIndexNew::new and ::index, they are already impl for Idx

This commit is contained in:
Santiago Pastorino 2017-09-27 16:31:31 -03:00
parent 0e6f4cf51c
commit 70c3a3da6d

View File

@ -569,20 +569,6 @@ pub(super) struct DepNodeIndexNew {
}
impl Idx for DepNodeIndexNew {
fn new(idx: usize) -> Self {
DepNodeIndexNew::new(idx)
}
fn index(self) -> usize {
self.index()
}
}
impl DepNodeIndexNew {
const INVALID: DepNodeIndexNew = DepNodeIndexNew {
index: ::std::u32::MAX,
};
fn new(v: usize) -> DepNodeIndexNew {
assert!((v & 0xFFFF_FFFF) == v);
DepNodeIndexNew { index: v as u32 }
@ -593,6 +579,12 @@ impl DepNodeIndexNew {
}
}
impl DepNodeIndexNew {
const INVALID: DepNodeIndexNew = DepNodeIndexNew {
index: ::std::u32::MAX,
};
}
#[derive(Clone, Debug, PartialEq)]
enum OpenTask {
Regular {