Browse Source

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.
merge-requests/413/merge
Paul Beziau 3 years ago
parent
commit
a2d8aec1e3
  1. 4
      src/database/mod.rs

4
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);

Loading…
Cancel
Save