Skip to content

Commit

Permalink
Update src/graph.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
  • Loading branch information
haoxins and mtreinish authored Apr 22, 2024
1 parent f3c922f commit 0592800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ impl PyGraph {
#[pyo3(text_signature = "(self, node, /)")]
pub fn has_node(&self, node: usize) -> bool {
let index = NodeIndex::new(node);
return self.graph.node_weight(index).is_some();
self.graph.contains_node(index)
}

/// Return True if there is an edge between ``node_a`` and ``node_b``.
Expand Down

0 comments on commit 0592800

Please sign in to comment.