@@ -20,43 +20,43 @@ fn write_reloc_name(reloc: &ObjReloc, color: Color32, job: &mut LayoutJob, font_
2020 let name = reloc. target . demangled_name . as_ref ( ) . unwrap_or ( & reloc. target . name ) ;
2121 write_text ( name, Color32 :: LIGHT_GRAY , job, font_id. clone ( ) ) ;
2222 if reloc. target . addend != 0 {
23- write_text ( & format ! ( "+{:X}" , reloc. target. addend) , color, job, font_id. clone ( ) ) ;
23+ write_text ( & format ! ( "+{:X}" , reloc. target. addend) , color, job, font_id) ;
2424 }
2525}
2626
2727fn write_reloc ( reloc : & ObjReloc , color : Color32 , job : & mut LayoutJob , font_id : FontId ) {
2828 match reloc. kind {
2929 ObjRelocKind :: PpcAddr16Lo => {
3030 write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
31- write_text ( "@l" , color, job, font_id. clone ( ) ) ;
31+ write_text ( "@l" , color, job, font_id) ;
3232 }
3333 ObjRelocKind :: PpcAddr16Hi => {
3434 write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
35- write_text ( "@h" , color, job, font_id. clone ( ) ) ;
35+ write_text ( "@h" , color, job, font_id) ;
3636 }
3737 ObjRelocKind :: PpcAddr16Ha => {
3838 write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
39- write_text ( "@ha" , color, job, font_id. clone ( ) ) ;
39+ write_text ( "@ha" , color, job, font_id) ;
4040 }
4141 ObjRelocKind :: PpcEmbSda21 => {
4242 write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
43- write_text ( "@sda21" , color, job, font_id. clone ( ) ) ;
43+ write_text ( "@sda21" , color, job, font_id) ;
4444 }
4545 ObjRelocKind :: MipsHi16 => {
4646 write_text ( "%hi(" , color, job, font_id. clone ( ) ) ;
4747 write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
48- write_text ( ")" , color, job, font_id. clone ( ) ) ;
48+ write_text ( ")" , color, job, font_id) ;
4949 }
5050 ObjRelocKind :: MipsLo16 => {
5151 write_text ( "%lo(" , color, job, font_id. clone ( ) ) ;
5252 write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
53- write_text ( ")" , color, job, font_id. clone ( ) ) ;
53+ write_text ( ")" , color, job, font_id) ;
5454 }
5555 ObjRelocKind :: Absolute
5656 | ObjRelocKind :: PpcRel24
5757 | ObjRelocKind :: PpcRel14
5858 | ObjRelocKind :: Mips26 => {
59- write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
59+ write_reloc_name ( reloc, color, job, font_id) ;
6060 }
6161 } ;
6262}
@@ -102,16 +102,16 @@ fn write_ins(
102102 match arg {
103103 ObjInsArg :: PpcArg ( arg) => match arg {
104104 Argument :: Offset ( val) => {
105- write_text ( & format ! ( "{}" , val ) , color, job, config. code_font . clone ( ) ) ;
105+ write_text ( & format ! ( "{val}" ) , color, job, config. code_font . clone ( ) ) ;
106106 write_text ( "(" , base_color, job, config. code_font . clone ( ) ) ;
107107 writing_offset = true ;
108108 continue ;
109109 }
110110 Argument :: Uimm ( _) | Argument :: Simm ( _) => {
111- write_text ( & format ! ( "{}" , arg ) , color, job, config. code_font . clone ( ) ) ;
111+ write_text ( & format ! ( "{arg}" ) , color, job, config. code_font . clone ( ) ) ;
112112 }
113113 _ => {
114- write_text ( & format ! ( "{}" , arg ) , color, job, config. code_font . clone ( ) ) ;
114+ write_text ( & format ! ( "{arg}" ) , color, job, config. code_font . clone ( ) ) ;
115115 }
116116 } ,
117117 ObjInsArg :: Reloc => {
@@ -133,7 +133,7 @@ fn write_ins(
133133 }
134134 ObjInsArg :: BranchOffset ( offset) => {
135135 let addr = offset + ins. address as i32 - base_addr as i32 ;
136- write_text ( & format ! ( "{:x}" , addr ) , color, job, config. code_font . clone ( ) ) ;
136+ write_text ( & format ! ( "{addr :x}" ) , color, job, config. code_font . clone ( ) ) ;
137137 }
138138 }
139139 if writing_offset {
@@ -171,7 +171,7 @@ fn ins_hover_ui(ui: &mut egui::Ui, ins: &ObjIns) {
171171 ui. label ( format ! ( "Relocation type: {:?}" , reloc. kind) ) ;
172172 ui. colored_label ( Color32 :: WHITE , format ! ( "Name: {}" , reloc. target. name) ) ;
173173 if let Some ( section) = & reloc. target_section {
174- ui. colored_label ( Color32 :: WHITE , format ! ( "Section: {}" , section ) ) ;
174+ ui. colored_label ( Color32 :: WHITE , format ! ( "Section: {section}" ) ) ;
175175 ui. colored_label ( Color32 :: WHITE , format ! ( "Address: {:x}" , reloc. target. address) ) ;
176176 ui. colored_label ( Color32 :: WHITE , format ! ( "Size: {:x}" , reloc. target. size) ) ;
177177 } else {
@@ -192,8 +192,8 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
192192 if let ObjInsArg :: PpcArg ( arg) = arg {
193193 match arg {
194194 Argument :: Uimm ( v) => {
195- if ui. button ( format ! ( "Copy \" {}\" " , v ) ) . clicked ( ) {
196- ui. output ( ) . copied_text = format ! ( "{}" , v ) ;
195+ if ui. button ( format ! ( "Copy \" {v }\" " ) ) . clicked ( ) {
196+ ui. output ( ) . copied_text = format ! ( "{v}" ) ;
197197 ui. close_menu ( ) ;
198198 }
199199 if ui. button ( format ! ( "Copy \" {}\" " , v. 0 ) ) . clicked ( ) {
@@ -202,8 +202,8 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
202202 }
203203 }
204204 Argument :: Simm ( v) => {
205- if ui. button ( format ! ( "Copy \" {}\" " , v ) ) . clicked ( ) {
206- ui. output ( ) . copied_text = format ! ( "{}" , v ) ;
205+ if ui. button ( format ! ( "Copy \" {v }\" " ) ) . clicked ( ) {
206+ ui. output ( ) . copied_text = format ! ( "{v}" ) ;
207207 ui. close_menu ( ) ;
208208 }
209209 if ui. button ( format ! ( "Copy \" {}\" " , v. 0 ) ) . clicked ( ) {
@@ -212,8 +212,8 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
212212 }
213213 }
214214 Argument :: Offset ( v) => {
215- if ui. button ( format ! ( "Copy \" {}\" " , v ) ) . clicked ( ) {
216- ui. output ( ) . copied_text = format ! ( "{}" , v ) ;
215+ if ui. button ( format ! ( "Copy \" {v }\" " ) ) . clicked ( ) {
216+ ui. output ( ) . copied_text = format ! ( "{v}" ) ;
217217 ui. close_menu ( ) ;
218218 }
219219 if ui. button ( format ! ( "Copy \" {}\" " , v. 0 ) ) . clicked ( ) {
@@ -227,7 +227,7 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
227227 }
228228 if let Some ( reloc) = & ins. reloc {
229229 if let Some ( name) = & reloc. target . demangled_name {
230- if ui. button ( format ! ( "Copy \" {}\" " , name ) ) . clicked ( ) {
230+ if ui. button ( format ! ( "Copy \" {name }\" " ) ) . clicked ( ) {
231231 ui. output ( ) . copied_text = name. clone ( ) ;
232232 ui. close_menu ( ) ;
233233 }
@@ -399,7 +399,7 @@ pub fn function_diff_ui(ui: &mut egui::Ui, view_state: &mut ViewState) -> bool {
399399 {
400400 ui. colored_label (
401401 match_color_for_symbol ( match_percent) ,
402- & format ! ( "{:.0}%" , match_percent ) ,
402+ & format ! ( "{match_percent :.0}%" ) ,
403403 ) ;
404404 }
405405 ui. label ( "Diff base:" ) ;
0 commit comments