@@ -34,15 +34,15 @@ fn build_ui(application: >k::Application) {
34
34
let scale: Scale = builder. object ( "scale" ) . expect ( "Couldn't get scale" ) ;
35
35
scale. connect_format_value ( |scale, value| {
36
36
let digits = scale. digits ( ) as usize ;
37
- format ! ( "<{:.* }>" , digits , value )
37
+ format ! ( "<{value:.digits$ }>" )
38
38
} ) ;
39
39
40
40
let spin_button: SpinButton = builder
41
41
. object ( "spin_button" )
42
42
. expect ( "Couldn't get spin_button" ) ;
43
43
spin_button. connect_input ( |spin_button| {
44
44
let text = spin_button. text ( ) ;
45
- println ! ( "spin_button_input: \" {}\" " , text ) ;
45
+ println ! ( "spin_button_input: \" {text }\" " ) ;
46
46
match text. parse :: < f64 > ( ) {
47
47
Ok ( value) if value >= 90. => {
48
48
println ! ( "circular right" ) ;
@@ -72,7 +72,7 @@ fn build_ui(application: >k::Application) {
72
72
( "Custom" , ResponseType :: Other ( 0 ) ) ] ) ;
73
73
74
74
dialog. connect_response( glib:: clone!( @weak entry => move |dialog, response| {
75
- entry. set_text( & format!( "Clicked {}" , response ) ) ;
75
+ entry. set_text( & format!( "Clicked {response}" ) ) ;
76
76
dialog. close( ) ;
77
77
} ) ) ;
78
78
dialog. show_all( ) ;
@@ -119,7 +119,7 @@ fn build_ui(application: >k::Application) {
119
119
dialog. connect_response( |dialog, response| {
120
120
if response == ResponseType :: Ok {
121
121
let files = dialog. filenames( ) ;
122
- println!( "Files: {:?}" , files ) ;
122
+ println!( "Files: {files :?}" ) ;
123
123
}
124
124
dialog. close( ) ;
125
125
} ) ;
@@ -159,7 +159,7 @@ fn build_ui(application: >k::Application) {
159
159
let keyval = key. keyval( ) ;
160
160
let keystate = key. state( ) ;
161
161
162
- println!( "key pressed: {} / {:?}" , keyval , keystate ) ;
162
+ println!( "key pressed: {keyval } / {keystate :?}" ) ;
163
163
println!( "text: {}" , entry. text( ) ) ;
164
164
165
165
if keystate. intersects( gdk:: ModifierType :: CONTROL_MASK ) {
0 commit comments