Skip to content

Commit

Permalink
fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamGallagher737 committed Jul 15, 2024
1 parent 1f6ec0d commit 6aff7c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/check_crate_updates/src/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ impl<'a> DependencyMut<'a> {
/// the value of the entry and then as a inline table.
/// Returns whether it was successful
pub fn set_version(&mut self, version: &str) -> bool {
if let Some(value) = self.0.get_mut("version").and_then(|i| i.as_value_mut()) {
*value = version.into();
true
} else if let Some(value) = self
if let Some(value) = self
.0
.as_inline_table_mut()
.and_then(|table| table.get_mut("version"))
{
*value = version.into();
true
} else if let Some(value) = self.0.as_value_mut() {
*value = version.into();
true
} else {
false
}
Expand Down

0 comments on commit 6aff7c5

Please sign in to comment.