diff options
Diffstat (limited to 'src/librustc_data_structures/graph/mod.rs')
| -rw-r--r-- | src/librustc_data_structures/graph/mod.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/graph/mod.rs index 474622f3669..56d5f5ffa3f 100644 --- a/src/librustc_data_structures/graph/mod.rs +++ b/src/librustc_data_structures/graph/mod.rs @@ -31,7 +31,7 @@ //! be indexed by the direction (see the type `Direction`). use bitvec::BitVector; -use std::fmt::{Formatter, Error, Debug}; +use std::fmt::Debug; use std::usize; use snapshot_vec::{SnapshotVec, SnapshotVecDelegate}; @@ -48,6 +48,7 @@ pub struct Node<N> { pub data: N, } +#[derive(Debug)] pub struct Edge<E> { next_edge: [EdgeIndex; 2], // see module comment source: NodeIndex, @@ -69,18 +70,6 @@ impl<N> SnapshotVecDelegate for Edge<N> { fn reverse(_: &mut Vec<Edge<N>>, _: ()) {} } -impl<E: Debug> Debug for Edge<E> { - fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { - write!(f, - "Edge {{ next_edge: [{:?}, {:?}], source: {:?}, target: {:?}, data: {:?} }}", - self.next_edge[0], - self.next_edge[1], - self.source, - self.target, - self.data) - } -} - #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] pub struct NodeIndex(pub usize); |
