Skip to content

Commit

Permalink
Return None for no records
Browse files Browse the repository at this point in the history
  • Loading branch information
rakanalh committed Jun 11, 2023
1 parent a8640bd commit 59f0eb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raiden/state-machine/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ impl StateStorage {

let row = match rows.next().map_err(StorageError::Sql)? {
Some(row) => row,
None => return Err(StorageError::Other("State change not found")),
None => return Ok(None),
};

let identifier: StorageID =
Expand Down Expand Up @@ -426,7 +426,7 @@ impl StateStorage {

let row = match rows.next().map_err(StorageError::Sql)? {
Some(row) => row,
None => return Err(StorageError::Other("Event not found")),
None => return Ok(None),
};
let identifier: StorageID =
row.get::<usize, String>(0).map_err(StorageError::Sql)?.try_into()?;
Expand Down

0 comments on commit 59f0eb2

Please sign in to comment.