@@ -21,9 +21,7 @@ use crate::{
2121pub struct ArchArm64 { }
2222
2323impl ArchArm64 {
24- pub fn new ( _file : & object:: File ) -> Result < Self > {
25- Ok ( Self { } )
26- }
24+ pub fn new ( _file : & object:: File ) -> Result < Self > { Ok ( Self { } ) }
2725}
2826
2927impl Arch for ArchArm64 {
@@ -188,9 +186,7 @@ struct DisplayCtx<'a> {
188186// Reworked for more structured output. The library only gives us a Display impl, and no way to
189187// capture any of this information, so it needs to be reimplemented here.
190188fn display_instruction < Cb > ( args : & mut Cb , ins : & Instruction , ctx : & mut DisplayCtx ) -> & ' static str
191- where
192- Cb : FnMut ( InstructionPart < ' static > ) ,
193- {
189+ where Cb : FnMut ( InstructionPart < ' static > ) {
194190 let mnemonic = match ins. opcode {
195191 Opcode :: Invalid => return "<invalid>" ,
196192 Opcode :: UDF => "udf" ,
@@ -2005,17 +2001,13 @@ fn condition_code(cond: u8) -> &'static str {
20052001
20062002#[ inline]
20072003fn push_register < Cb > ( args : & mut Cb , size : SizeCode , reg : u16 , sp : bool )
2008- where
2009- Cb : FnMut ( InstructionPart < ' static > ) ,
2010- {
2004+ where Cb : FnMut ( InstructionPart < ' static > ) {
20112005 push_opaque ( args, reg_name ( size, reg, sp) ) ;
20122006}
20132007
20142008#[ inline]
20152009fn push_shift < Cb > ( args : & mut Cb , style : ShiftStyle , amount : u8 )
2016- where
2017- Cb : FnMut ( InstructionPart < ' static > ) ,
2018- {
2010+ where Cb : FnMut ( InstructionPart < ' static > ) {
20192011 push_opaque ( args, shift_style ( style) ) ;
20202012 if amount != 0 {
20212013 push_plain ( args, " " ) ;
@@ -2025,16 +2017,12 @@ where
20252017
20262018#[ inline]
20272019fn push_condition_code < Cb > ( args : & mut Cb , cond : u8 )
2028- where
2029- Cb : FnMut ( InstructionPart < ' static > ) ,
2030- {
2020+ where Cb : FnMut ( InstructionPart < ' static > ) {
20312021 push_opaque ( args, condition_code ( cond) ) ;
20322022}
20332023
20342024fn push_barrier < Cb > ( args : & mut Cb , option : u8 )
2035- where
2036- Cb : FnMut ( InstructionPart < ' static > ) ,
2037- {
2025+ where Cb : FnMut ( InstructionPart < ' static > ) {
20382026 match option {
20392027 0b0001 => push_opaque ( args, "oshld" ) ,
20402028 0b0010 => push_opaque ( args, "oshst" ) ,
@@ -2054,42 +2042,32 @@ where
20542042
20552043#[ inline]
20562044fn push_opaque < ' a , Cb > ( args : & mut Cb , text : & ' a str )
2057- where
2058- Cb : FnMut ( InstructionPart < ' a > ) ,
2059- {
2045+ where Cb : FnMut ( InstructionPart < ' a > ) {
20602046 args ( InstructionPart :: opaque ( text) ) ;
20612047}
20622048
20632049#[ inline]
20642050fn push_plain < Cb > ( args : & mut Cb , text : & ' static str )
2065- where
2066- Cb : FnMut ( InstructionPart < ' static > ) ,
2067- {
2051+ where Cb : FnMut ( InstructionPart < ' static > ) {
20682052 args ( InstructionPart :: basic ( text) ) ;
20692053}
20702054
20712055#[ inline]
20722056fn push_separator < Cb > ( args : & mut Cb )
2073- where
2074- Cb : FnMut ( InstructionPart < ' static > ) ,
2075- {
2057+ where Cb : FnMut ( InstructionPart < ' static > ) {
20762058 args ( InstructionPart :: separator ( ) ) ;
20772059}
20782060
20792061#[ inline]
20802062fn push_unsigned < Cb > ( args : & mut Cb , v : u64 )
2081- where
2082- Cb : FnMut ( InstructionPart < ' static > ) ,
2083- {
2063+ where Cb : FnMut ( InstructionPart < ' static > ) {
20842064 push_plain ( args, "#" ) ;
20852065 args ( InstructionPart :: unsigned ( v) ) ;
20862066}
20872067
20882068#[ inline]
20892069fn push_signed < Cb > ( args : & mut Cb , v : i64 )
2090- where
2091- Cb : FnMut ( InstructionPart < ' static > ) ,
2092- {
2070+ where Cb : FnMut ( InstructionPart < ' static > ) {
20932071 push_plain ( args, "#" ) ;
20942072 args ( InstructionPart :: signed ( v) ) ;
20952073}
@@ -2129,9 +2107,7 @@ fn is_reg_index_reloc(resolved: Option<ResolvedRelocation>) -> bool {
21292107}
21302108
21312109fn push_operand < Cb > ( args : & mut Cb , o : & Operand , ctx : & mut DisplayCtx )
2132- where
2133- Cb : FnMut ( InstructionPart < ' static > ) ,
2134- {
2110+ where Cb : FnMut ( InstructionPart < ' static > ) {
21352111 match o {
21362112 Operand :: Nothing => unreachable ! ( ) ,
21372113 Operand :: PCOffset ( off) => {
0 commit comments