Skip to content

Commit

Permalink
clippy: fix conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfpdn committed Apr 19, 2024
1 parent afa57f1 commit b2f31de
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sdd-rs-lib/vtree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,7 @@ impl Dot for VTreeManager {

// Get the total order first to neatly order the leaf nodes in the graph.
for (label, idx) in self.total_order() {
writer.add_node(
usize::try_from(idx).unwrap(),
NodeType::CircleStr(label.str()),
);
writer.add_node(usize::from(idx), NodeType::CircleStr(label.str()));
}

let mut nodes = vec![self.root.as_ref().unwrap().clone()];
Expand All @@ -301,8 +298,8 @@ impl Dot for VTreeManager {
nodes.push(rc.clone());

writer.add_node(
usize::try_from(vtree.idx).unwrap(),
NodeType::Circle(u32::try_from(vtree.idx).unwrap()),
usize::from(vtree.idx),
NodeType::Circle(u32::from(vtree.idx)),
);
};
}
Expand Down

0 comments on commit b2f31de

Please sign in to comment.