firmware: assume empty config records as removed (#2064)

This will return `KeyNotFound` for empty values, which are produced by `remove` operation

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2023-03-13 18:18:26 +08:00 committed by Sebastien Bourdeauducq
parent 6bf3f53367
commit 1d45bed90a

View File

@ -163,7 +163,7 @@ mod imp {
while let Some(result) = iter.next() {
let (record_key, record_value) = result?;
if key.as_bytes() == record_key {
found = true;
found = !record_value.is_empty();
// last write wins
value = record_value
}