Skip to content

Commit 1a2baf6

Browse files
authored
Fix Clippy findings for Rust 1.89 (#1490)
* Fix Clippy findings for Rust 1.89 * Fix for rustworkx failure itself
1 parent f0240d4 commit 1a2baf6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rustworkx-core/src/shortest_path/bellman_ford.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ where
133133
}
134134

135135
// Build path from predecessors
136-
if path.is_some() {
136+
if let Some(path) = &mut path {
137137
for node in graph.node_identifiers() {
138138
if scores.get_item(node).is_some() {
139139
let mut node_path = Vec::<G::NodeId>::new();
@@ -144,7 +144,7 @@ where
144144
node_path.push(current_node);
145145
}
146146
node_path.reverse();
147-
path.as_mut().unwrap().insert(node, node_path);
147+
path.insert(node, node_path);
148148
}
149149
}
150150
}

src/graphml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ enum Value {
186186
}
187187

188188
impl Value {
189-
fn serialize(&self) -> Option<Cow<str>> {
189+
fn serialize(&self) -> Option<Cow<'_, str>> {
190190
match self {
191191
Value::Boolean(val) => Some(Cow::from(val.to_string())),
192192
Value::Int(val) => Some(Cow::from(val.to_string())),

0 commit comments

Comments
 (0)