Skip to content

Commit

Permalink
Minor: Cargo doc fixup. (#630)
Browse files Browse the repository at this point in the history
Clippy suggests using this markdown convention when discussing unsafe
code.

A new heading and section is added.

This is how the updated page looks 


![Safe](https://github.com/petgraph/petgraph/assets/1259969/da94c8de-46d3-4251-9a72-c5399683d73c)
  • Loading branch information
martinfrances107 committed Apr 11, 2024
1 parent 5cabfe3 commit 5b2d8da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/graph_impl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub type DefaultIx = u32;

/// Trait for the unsigned integer type used for node and edge indices.
///
/// # Safety
///
/// Marked `unsafe` because: the trait must faithfully preserve
/// and convert index values.
pub unsafe trait IndexType: Copy + Default + Hash + Ord + fmt::Debug + 'static {
Expand Down

0 comments on commit 5b2d8da

Please sign in to comment.