Skip to content

Commit

Permalink
Do not panic if one of the dependencies tables is missing (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaput authored Dec 11, 2024
1 parent f1577de commit cb3d872
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ fn edit_dependencies(cargo_toml: &mut DocumentMut, table_path: &str, args: &Args
else {
return;
};
if deps.is_none() {
return;
}
let deps = deps.as_table_mut().unwrap();

for (_, dep) in deps.iter_mut().filter(|(key, _)| args.dep.owns(key)) {
Expand Down

0 comments on commit cb3d872

Please sign in to comment.