-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What is the expected enhancement?
Currently, setting source to non present indices in bfs_search
will panic.
Running
import rustworkx as rx
from rustworkx.visit import BFSVisitor
graph = rx.PyGraph()
rx.bfs_search(graph, [100], BFSVisitor())
raises:
Traceback (most recent call last):
pyo3_runtime.PanicException: put at index 100 exceeds fixedbitset size 0
I suggest:
- raising an IndexError instead.
- In
rustworkx-core
either returning an Error or documenting the panic behavior - If needed do the same for other traversals (dfs, dijkstra).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working