mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2024-12-26 18:14:51 +00:00
rs: Use &*
instead of .as_ref().unwrap()
This commit is contained in:
parent
15011a8c18
commit
7d0de275c5
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user