@@ -29,7 +29,7 @@ impl Window {
29
29
let action_count = SimpleAction :: new_stateful (
30
30
"count" ,
31
31
Some ( & i32:: static_variant_type ( ) ) ,
32
- & original_state. to_variant ( ) ,
32
+ original_state. to_variant ( ) ,
33
33
) ;
34
34
35
35
action_count. connect_activate ( clone ! ( @weak label => move |action, parameter| {
@@ -48,7 +48,7 @@ impl Window {
48
48
49
49
// Increase state by parameter and save state
50
50
state += parameter;
51
- action. set_state( & state. to_variant( ) ) ;
51
+ action. set_state( state. to_variant( ) ) ;
52
52
53
53
// Update label with new state
54
54
label. set_label( & format!( "Counter: {state}" ) ) ;
@@ -70,7 +70,7 @@ impl Window {
70
70
let action_orientation = SimpleAction :: new_stateful (
71
71
"orientation" ,
72
72
Some ( & String :: static_variant_type ( ) ) ,
73
- & "Vertical" . to_variant ( ) ,
73
+ "Vertical" . to_variant ( ) ,
74
74
) ;
75
75
76
76
action_orientation. connect_activate ( clone ! ( @weak gtk_box =>
@@ -89,7 +89,7 @@ impl Window {
89
89
90
90
// Set orientation and save state
91
91
gtk_box. set_orientation( orientation) ;
92
- action. set_state( & parameter. to_variant( ) ) ;
92
+ action. set_state( parameter. to_variant( ) ) ;
93
93
} ) ) ;
94
94
self . add_action ( & action_orientation) ;
95
95
//ANCHOR_END: action_orientation
0 commit comments