Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 12c11f6

Browse files
let error propagate instead of panicking (#3754)
1 parent 02b1265 commit 12c11f6

File tree

1 file changed

+1
-1
lines changed
  • token/program-2022/src/extension

1 file changed

+1
-1
lines changed

token/program-2022/src/extension/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl<'data, S: BaseState> StateWithExtensionsMut<'data, S> {
494494
pod_from_bytes_mut::<Length>(&mut self.tlv_data[length_start..value_start])?;
495495
// maybe this becomes smarter later for dynamically sized extensions
496496
let length = pod_get_packed_len::<V>();
497-
*length_ref = Length::try_from(length).unwrap();
497+
*length_ref = Length::try_from(length)?;
498498

499499
let value_end = value_start.saturating_add(length);
500500
let extension_ref =

0 commit comments

Comments
 (0)