diff options
author | Paul Beziau <paul.beziau@laposte.net> | 2022-11-03 13:12:53 +0000 |
---|---|---|
committer | Paul Beziau <paul.beziau@laposte.net> | 2022-11-03 13:12:53 +0000 |
commit | a2d8aec1e3a1578872f1caaee719d3acfa5227bc (patch) | |
tree | 1423bcf3dc64feb8992ef79f38675a9f39af9cc9 /src/database | |
parent | d47c1a8ba678bf58b1ff8bdb65438aaaddc80188 (diff) | |
download | conduit-a2d8aec1e3a1578872f1caaee719d3acfa5227bc.zip |
Moving the unwraping of a variable
Moving the unwraping of the variable "rule" inside the condition instead of the if body, for the migration of the database from version 11 to 12.
Diffstat (limited to 'src/database')
-rw-r--r-- | src/database/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index ccc8177..f6a76c6 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -851,8 +851,8 @@ impl KeyValueDatabase { for transformation in underride_rule_transformation { let rule = rules_list.underride.get(transformation[0]); - if rule.is_some() { - let mut rule = rule.unwrap().clone(); + if let Some(rule) = rule { + let mut rule = rule.clone(); rule.rule_id = transformation[1].to_string(); rules_list.underride.remove(transformation[0]); rules_list.underride.insert(rule); |