Add Copy to IncidenceCursor trait

This commit is contained in:
2026-07-17 09:53:05 +02:00
parent 24c08438d6
commit 8c6c98859c
+2 -2
View File
@@ -5,7 +5,7 @@ use crate::maps::{EdgeMap, VertexMap};
pub trait GraphTopology {
type Vertex: Copy + Eq;
type Edge: Copy + Eq;
type IncidenceCursor: IncidenceCursor<Self> + Copy;
type IncidenceCursor: IncidenceCursor<Self>;
fn vertex_count(&self) -> usize;
fn vertex_capacity(&self) -> usize;
@@ -31,6 +31,6 @@ pub trait GraphTopologyDeletion: GraphTopology {
fn delete_edge(&mut self, e: Self::Edge);
}
pub trait IncidenceCursor<G: GraphTopology + ?Sized> {
pub trait IncidenceCursor<G: GraphTopology + ?Sized>: Copy {
fn next(&mut self, graph: &G) -> Option<(G::Vertex, G::Edge)>;
}