Skip to content

Commit

Permalink
Auto-fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantomical committed Feb 11, 2024
1 parent 27247b5 commit 6e7ac55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl DecodeOptions {
/// anything beyond the 15th byte.
/// - `options` - A set of [`DecodeOptions`] that control how the instruction is
/// decoded.
pub fn decode<'a>(itext: &'a [u8], options: DecodeOptions) -> Result<DecodedInst<'a>, Error> {
pub fn decode(itext: &[u8], options: DecodeOptions) -> Result<DecodedInst<'_>, Error> {
let mut inst = MaybeUninit::uninit();
unsafe { xed_decoded_inst_zero_set_mode(inst.as_mut_ptr(), options.state.as_raw()) };

Expand Down
2 changes: 1 addition & 1 deletion src/decoded_inst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ impl<'d> DecodedInst<'d> {
// Formatting
impl<'d> DecodedInst<'d> {
/// Disassemble this instruction using the specified syntax.
pub fn disassemble<'a>(&'a self, syntax: Syntax) -> String {
pub fn disassemble(&self, syntax: Syntax) -> String {
let mut buffer = vec![0u8; 32];

loop {
Expand Down
6 changes: 2 additions & 4 deletions src/inst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ impl Inst {

pub fn iform(&self) -> IForm {
unsafe { xed_inst_iform_enum(self.as_raw()) }
.try_into()
.expect("instruction iform was invalid")
.into()
}

pub fn iclass(&self) -> IClass {
unsafe { xed_inst_iclass(self.as_raw()) }
.try_into()
.expect("instruction iclass was invalid")
.into()
}

pub fn category(&self) -> Category {
Expand Down

0 comments on commit 6e7ac55

Please sign in to comment.