The docs for try_add_edge say:
... (returns) [AcyclicEdgeError] if the edge would create a cycle, a self-loop or if the edge addition failed in the underlying graph.
I'm using GraphMap as the underlying graph, where you can add duplicated edges, I don't think any of these conditions are true but I'm getting an error.
Minimal repro:
fn main() {
let mut graph = Acyclic::<GraphMap<usize, (), Directed>>::new();
graph.add_node(0);
graph.add_node(1);
graph.try_add_edge(0, 1, ()).unwrap();
graph.try_add_edge(0, 1, ()).unwrap(); // `Result::unwrap()` on an `Err` value: InvalidEdge
}