Information
- rustworkx version: 0.17.1
- Python version: N/A
- Rust version: 1.96.0-nightly (900485642 2026-04-08)
- Operating system: Fedora Linux 44 (Workstation Edition)
What is the current behavior?
When calling misra_gries_edge_color, I get a panic when passing an UnGraphMap. The panic occurs at rustworkx-core-0.17.1/src/coloring.rs:711:21 with message "edge not found".
The issue vanishes if I convert it to an UnGraph first. However, the documentation does not mention this as being a requirement.
What is the expected behavior?
The function should return DictMap with the coloring without panic.
Steps to reproduce the problem
Use the MWE:
use petgraph::prelude::UnGraphMap;
use rustworkx_core::coloring::misra_gries_edge_color;
fn main() {
let mut my_graph: UnGraphMap<&str, &str> = UnGraphMap::new();
my_graph.add_edge("Node 1", "Node 2", "Edge 1");
my_graph.add_edge("Node 2", "Node 3", "Edge 2");
misra_gries_edge_color(&my_graph);
}
Information
What is the current behavior?
When calling
misra_gries_edge_color, I get a panic when passing anUnGraphMap. The panic occurs atrustworkx-core-0.17.1/src/coloring.rs:711:21with message "edge not found".The issue vanishes if I convert it to an
UnGraphfirst. However, the documentation does not mention this as being a requirement.What is the expected behavior?
The function should return
DictMapwith the coloring without panic.Steps to reproduce the problem
Use the MWE: