Skip to content

Commit 9d93bcf

Browse files
committed
- Improve documentation
Attempt to explain when a panic!() may be hit in use.
1 parent 5b9f7dc commit 9d93bcf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/graph.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,15 @@ impl<T> Graph<T> {
983983
/// use topo.is_cylic() == false to verify
984984
/// that your graph is a DAG.
985985
///
986+
/// If you attempt to use a topological
987+
/// order without confirming that your graph
988+
/// is a DAG, you may encounter a panic!().
989+
///
990+
/// The panic!() will be encountered when
991+
/// the iterator detects that there are no
992+
/// more vertices to visit, but all vertices
993+
/// have not been visited.
994+
///
986995
/// ## Example
987996
/// ```rust
988997
/// # #[macro_use] extern crate graphlib; fn main() {

0 commit comments

Comments
 (0)