diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-04-14 15:15:03 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2024-04-14 15:46:40 +0000 |
| commit | 398da593a53161c1ef9ca7dabbc5e9edf67deac6 (patch) | |
| tree | 540996de1e73ca1f6c0ba581a1754b4a624bf519 /compiler/rustc_data_structures/src/graph/vec_graph | |
| parent | 029cb1b13b6388b95e64e8996ec8b41a9f3cf16e (diff) | |
| download | rust-398da593a53161c1ef9ca7dabbc5e9edf67deac6.tar.gz rust-398da593a53161c1ef9ca7dabbc5e9edf67deac6.zip | |
Merge `WithNumNodes` into DirectedGraph
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/vec_graph')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/vec_graph/mod.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs index 00f6266ce1d..79efe3fb8e0 100644 --- a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs +++ b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs @@ -1,4 +1,4 @@ -use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors}; +use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithSuccessors}; use rustc_index::{Idx, IndexVec}; #[cfg(test)] @@ -80,9 +80,7 @@ impl<N: Idx + Ord> VecGraph<N> { impl<N: Idx> DirectedGraph for VecGraph<N> { type Node = N; -} -impl<N: Idx> WithNumNodes for VecGraph<N> { fn num_nodes(&self) -> usize { self.node_starts.len() - 1 } |
