as_store_bytes not fallible (#5285)

This commit is contained in:
Lion - dapplion
2024-02-27 09:23:05 +08:00
committed by GitHub
parent 5dfc5c1f88
commit 928915c718
19 changed files with 92 additions and 102 deletions

View File

@@ -44,8 +44,8 @@ impl StoreItem for PersistedDht {
DBColumn::DhtEnrs
}
fn as_store_bytes(&self) -> Result<Vec<u8>, StoreError> {
Ok(rlp::encode_list(&self.enrs).to_vec())
fn as_store_bytes(&self) -> Vec<u8> {
rlp::encode_list(&self.enrs).to_vec()
}
fn from_store_bytes(bytes: &[u8]) -> Result<Self, StoreError> {