@@ -20,43 +20,43 @@ fn write_reloc_name(reloc: &ObjReloc, color: Color32, job: &mut LayoutJob, font_
20
20
let name = reloc. target . demangled_name . as_ref ( ) . unwrap_or ( & reloc. target . name ) ;
21
21
write_text ( name, Color32 :: LIGHT_GRAY , job, font_id. clone ( ) ) ;
22
22
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) ;
24
24
}
25
25
}
26
26
27
27
fn write_reloc ( reloc : & ObjReloc , color : Color32 , job : & mut LayoutJob , font_id : FontId ) {
28
28
match reloc. kind {
29
29
ObjRelocKind :: PpcAddr16Lo => {
30
30
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) ;
32
32
}
33
33
ObjRelocKind :: PpcAddr16Hi => {
34
34
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) ;
36
36
}
37
37
ObjRelocKind :: PpcAddr16Ha => {
38
38
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) ;
40
40
}
41
41
ObjRelocKind :: PpcEmbSda21 => {
42
42
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) ;
44
44
}
45
45
ObjRelocKind :: MipsHi16 => {
46
46
write_text ( "%hi(" , color, job, font_id. clone ( ) ) ;
47
47
write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
48
- write_text ( ")" , color, job, font_id. clone ( ) ) ;
48
+ write_text ( ")" , color, job, font_id) ;
49
49
}
50
50
ObjRelocKind :: MipsLo16 => {
51
51
write_text ( "%lo(" , color, job, font_id. clone ( ) ) ;
52
52
write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
53
- write_text ( ")" , color, job, font_id. clone ( ) ) ;
53
+ write_text ( ")" , color, job, font_id) ;
54
54
}
55
55
ObjRelocKind :: Absolute
56
56
| ObjRelocKind :: PpcRel24
57
57
| ObjRelocKind :: PpcRel14
58
58
| ObjRelocKind :: Mips26 => {
59
- write_reloc_name ( reloc, color, job, font_id. clone ( ) ) ;
59
+ write_reloc_name ( reloc, color, job, font_id) ;
60
60
}
61
61
} ;
62
62
}
@@ -102,16 +102,16 @@ fn write_ins(
102
102
match arg {
103
103
ObjInsArg :: PpcArg ( arg) => match arg {
104
104
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 ( ) ) ;
106
106
write_text ( "(" , base_color, job, config. code_font . clone ( ) ) ;
107
107
writing_offset = true ;
108
108
continue ;
109
109
}
110
110
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 ( ) ) ;
112
112
}
113
113
_ => {
114
- write_text ( & format ! ( "{}" , arg ) , color, job, config. code_font . clone ( ) ) ;
114
+ write_text ( & format ! ( "{arg}" ) , color, job, config. code_font . clone ( ) ) ;
115
115
}
116
116
} ,
117
117
ObjInsArg :: Reloc => {
@@ -133,7 +133,7 @@ fn write_ins(
133
133
}
134
134
ObjInsArg :: BranchOffset ( offset) => {
135
135
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 ( ) ) ;
137
137
}
138
138
}
139
139
if writing_offset {
@@ -171,7 +171,7 @@ fn ins_hover_ui(ui: &mut egui::Ui, ins: &ObjIns) {
171
171
ui. label ( format ! ( "Relocation type: {:?}" , reloc. kind) ) ;
172
172
ui. colored_label ( Color32 :: WHITE , format ! ( "Name: {}" , reloc. target. name) ) ;
173
173
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}" ) ) ;
175
175
ui. colored_label ( Color32 :: WHITE , format ! ( "Address: {:x}" , reloc. target. address) ) ;
176
176
ui. colored_label ( Color32 :: WHITE , format ! ( "Size: {:x}" , reloc. target. size) ) ;
177
177
} else {
@@ -192,8 +192,8 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
192
192
if let ObjInsArg :: PpcArg ( arg) = arg {
193
193
match arg {
194
194
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}" ) ;
197
197
ui. close_menu ( ) ;
198
198
}
199
199
if ui. button ( format ! ( "Copy \" {}\" " , v. 0 ) ) . clicked ( ) {
@@ -202,8 +202,8 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
202
202
}
203
203
}
204
204
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}" ) ;
207
207
ui. close_menu ( ) ;
208
208
}
209
209
if ui. button ( format ! ( "Copy \" {}\" " , v. 0 ) ) . clicked ( ) {
@@ -212,8 +212,8 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
212
212
}
213
213
}
214
214
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}" ) ;
217
217
ui. close_menu ( ) ;
218
218
}
219
219
if ui. button ( format ! ( "Copy \" {}\" " , v. 0 ) ) . clicked ( ) {
@@ -227,7 +227,7 @@ fn ins_context_menu(ui: &mut egui::Ui, ins: &ObjIns) {
227
227
}
228
228
if let Some ( reloc) = & ins. reloc {
229
229
if let Some ( name) = & reloc. target . demangled_name {
230
- if ui. button ( format ! ( "Copy \" {}\" " , name ) ) . clicked ( ) {
230
+ if ui. button ( format ! ( "Copy \" {name }\" " ) ) . clicked ( ) {
231
231
ui. output ( ) . copied_text = name. clone ( ) ;
232
232
ui. close_menu ( ) ;
233
233
}
@@ -399,7 +399,7 @@ pub fn function_diff_ui(ui: &mut egui::Ui, view_state: &mut ViewState) -> bool {
399
399
{
400
400
ui. colored_label (
401
401
match_color_for_symbol ( match_percent) ,
402
- & format ! ( "{:.0}%" , match_percent ) ,
402
+ & format ! ( "{match_percent :.0}%" ) ,
403
403
) ;
404
404
}
405
405
ui. label ( "Diff base:" ) ;
0 commit comments