Skip to content

Commit 0422708

Browse files
committed
fixed truncated limitation
1 parent 6997194 commit 0422708

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/block/block.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ impl Block {
109109
/// instruction does not fit entirely into this block's section.
110110
///
111111
/// This field is only valid if truncated is set.
112-
pub fn raw(&self) -> Option<&[u8]> {
113-
if self.truncated() { Some(&self.0.raw[..self.0.size as usize]) }
114-
else { None }
112+
pub fn raw(&self) -> &[u8] {
113+
&self.0.raw[..self.0.size as usize]
115114
}
116115

117116
/// A collection of flags giving additional information about the

0 commit comments

Comments
 (0)