Hacker News new | ask | show | jobs
by DennisP 3529 days ago
How do you handle cycles? I've seen discussions on places like /r/rust where people didn't seem to have any pleasant answers.
1 comments

I tend to use petgraph[1] when I need a graph-like data structure (the only time I've needed cycles). Super fast, distinguishes `Node`s from `Edge`s, lots of useful items for different kinds of traversal.

[1]: https://github.com/bluss/petgraph