We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 011ab37 commit dca6a90Copy full SHA for dca6a90
1 file changed
dstack-attest/src/attestation.rs
@@ -355,15 +355,13 @@ pub enum VersionedAttestation {
355
356
impl Encode for VersionedAttestation {
357
fn size_hint(&self) -> usize {
358
- self.to_bytes()
359
- .map(|b| b.len())
360
- .unwrap_or(0)
+ self.to_bytes().map(|b| b.len()).unwrap_or(0)
361
}
362
363
fn encode_to<T: Output + ?Sized>(&self, dest: &mut T) {
364
let bytes = self
365
.to_bytes()
366
- .expect("VersionedAttestation should always encode successfully");
+ .or_panic("VersionedAttestation should always encode successfully");
367
dest.write(&bytes);
368
369
0 commit comments