Skip to content

Commit

Permalink
Add unwrap safety comment
Browse files Browse the repository at this point in the history
  • Loading branch information
G8XSU committed Jan 5, 2024
1 parent 3da5889 commit f87d3e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/io/vss_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ impl KVStore for VssStore {
_ => Error::new(ErrorKind::Other, msg),
}
})?;
// unwrap safety: resp.value must be always present for a non-erroneous VSS response, otherwise
// it is an API-violation which is converted to [`VssError::InternalServerError`] in [`VssClient`]
let storable = Storable::decode(&resp.value.unwrap().value[..])?;
Ok(self.storable_builder.deconstruct(storable)?.0)
}
Expand Down

0 comments on commit f87d3e7

Please sign in to comment.