fix wrong position set method

This commit is contained in:
Pakin 2025-09-10 14:10:24 +07:00
parent 0e7eca5ebf
commit 76c7f949ea

View file

@ -129,10 +129,10 @@ impl RecipeListChange {
let new_repl = current_repl.1.unwrap();
let diff = old_repl.compare(new_repl);
*checked.get_mut(ci).unwrap() = diff;
checked[ci] = diff;
} else if current_repl.0.is_none() && current_repl.1.is_some() {
// new value
*checked.get_mut(ci).unwrap() = current_repl
checked[ci] = current_repl
.1
.unwrap()
.to_map()
@ -143,7 +143,7 @@ impl RecipeListChange {
.collect();
} else if current_repl.0.is_some() && current_repl.1.is_none() {
// new value does not exist
*checked.get_mut(ci).unwrap() = current_repl
checked[ci] = current_repl
.0
.unwrap()
.to_map()