diff --git a/CHANGELOG.md b/CHANGELOG.md index 45e03b2..4700b5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Minor cleanups on Rust code. + ## [1.8.0] - 2023-11-12 ### Added diff --git a/rust/src/instruction.rs b/rust/src/instruction.rs index 2d4f455..ed56a22 100644 --- a/rust/src/instruction.rs +++ b/rust/src/instruction.rs @@ -562,11 +562,11 @@ impl Instruction { } pub fn get_operand_type(&self, index: usize) -> operand_type_enum::OperandType { - unsafe { self.descriptor.as_ref().unwrap().get_operand_type(index) } + unsafe { &*self.descriptor }.get_operand_type(index) } pub fn get_operands_slice(&self) -> &[operand_type_enum::OperandType] { - unsafe { self.descriptor.as_ref().unwrap().operands_slice() } + unsafe { &*self.descriptor }.operands_slice() } pub fn instr_suffix(&self) -> instr_suffix_enum::InstrSuffix {