Fix AppendGraph::capacity to actually use the underlying vec's capacity
This commit is contained in:
@@ -91,7 +91,7 @@ impl GraphTopology for AppendGraph {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn vertex_capacity(&self) -> usize {
|
fn vertex_capacity(&self) -> usize {
|
||||||
self.vertices.len()
|
self.vertices.capacity()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn vertex_map<T: Clone>(&self, default: T) -> VertexMap<Self::Vertex, T> {
|
fn vertex_map<T: Clone>(&self, default: T) -> VertexMap<Self::Vertex, T> {
|
||||||
|
|||||||
Reference in New Issue
Block a user