Skip to content

Commit

Permalink
Summonerd: remove unnecessary checked parsing when fetching root
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Oct 20, 2023
1 parent 1d12603 commit f60d496
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/summonerd/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,10 @@ impl Storage {
|row| row.get::<usize, Vec<u8>>(0),
)?;
Ok(
Phase1RawCeremonyCRS::try_from(pb::CeremonyCrs::decode(data.as_slice())?)?
.assume_valid(),
Phase1RawCeremonyCRS::unchecked_from_protobuf(pb::CeremonyCrs::decode(
data.as_slice(),
)?)?
.assume_valid(),
)
}

Expand All @@ -326,8 +328,10 @@ impl Storage {
|row| row.get::<usize, Vec<u8>>(0),
)?;
Ok(
Phase2RawCeremonyCRS::try_from(pb::CeremonyCrs::decode(data.as_slice())?)?
.assume_valid(),
Phase2RawCeremonyCRS::unchecked_from_protobuf(pb::CeremonyCrs::decode(
data.as_slice(),
)?)?
.assume_valid(),
)
}

Expand Down

0 comments on commit f60d496

Please sign in to comment.