@@ -59,7 +59,7 @@ impl AsyncEditor for AndroidImpl {
59
59
let instance_receiver = self . jvm . invoke_to_channel (
60
60
& self . show_menu_cb ,
61
61
"apply" ,
62
- & vec ! [ InvocationArg :: from( try_pass_menu_name) ] ) ;
62
+ & [ InvocationArg :: from ( try_pass_menu_name) ] ) ;
63
63
debug ! ( "Waiting for password..." ) ;
64
64
japi:: handle_instance_receiver_result ( instance_receiver)
65
65
}
@@ -70,7 +70,7 @@ impl AsyncEditor for AndroidImpl {
70
70
let instance_receiver = self . jvm . invoke_to_channel (
71
71
& self . show_menu_cb ,
72
72
"apply" ,
73
- & vec ! [ InvocationArg :: from( change_pass_menu_name) ] ) ;
73
+ & [ InvocationArg :: from ( change_pass_menu_name) ] ) ;
74
74
debug ! ( "Waiting for password..." ) ;
75
75
japi:: handle_instance_receiver_result ( instance_receiver)
76
76
}
@@ -89,21 +89,21 @@ impl AsyncEditor for AndroidImpl {
89
89
self . jvm . invoke_to_channel (
90
90
& self . show_menu_cb ,
91
91
"apply" ,
92
- & vec ! [ InvocationArg :: from( Menu :: Main . get_name( ) ) ] )
92
+ & [ InvocationArg :: from ( Menu :: Main . get_name ( ) ) ] )
93
93
}
94
94
& Menu :: EntriesList ( _) => {
95
95
let java_entries: Vec < japi:: JavaEntry > = safe. get_entries ( ) . iter ( )
96
96
. map ( |entry| japi:: JavaEntry :: new ( entry) )
97
97
. collect ( ) ;
98
- let filter = if safe. get_filter ( ) . len ( ) == 0 {
98
+ let filter = if safe. get_filter ( ) . is_empty ( ) {
99
99
"null" . to_string ( )
100
100
} else {
101
101
safe. get_filter ( ) . clone ( )
102
102
} ;
103
103
self . jvm . invoke_to_channel (
104
104
& self . show_entries_set_cb ,
105
105
"apply" ,
106
- & vec ! [
106
+ & [
107
107
InvocationArg :: from ( (
108
108
java_entries. as_slice ( ) ,
109
109
"org.astonbitecode.rustkeylock.api.JavaEntry" ,
@@ -115,7 +115,7 @@ impl AsyncEditor for AndroidImpl {
115
115
self . jvm . invoke_to_channel (
116
116
& self . show_entry_cb ,
117
117
"apply" ,
118
- & vec ! [
118
+ & [
119
119
InvocationArg :: new ( & japi:: JavaEntry :: new ( & entry) , "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
120
120
InvocationArg :: from ( index as i32 ) ,
121
121
InvocationArg :: from ( false ) ,
@@ -128,7 +128,7 @@ impl AsyncEditor for AndroidImpl {
128
128
self . jvm . invoke_to_channel (
129
129
& self . show_entry_cb ,
130
130
"apply" ,
131
- & vec ! [
131
+ & [
132
132
InvocationArg :: new ( & entry, "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
133
133
InvocationArg :: from ( index as i32 ) ,
134
134
InvocationArg :: from ( false ) ,
@@ -141,19 +141,19 @@ impl AsyncEditor for AndroidImpl {
141
141
self . jvm . invoke_to_channel (
142
142
& self . show_entry_cb ,
143
143
"apply" ,
144
- & vec ! [
144
+ & [
145
145
InvocationArg :: new ( & empty_entry, "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
146
146
InvocationArg :: from ( -1 ) ,
147
147
InvocationArg :: from ( true ) ,
148
148
InvocationArg :: from ( false )
149
149
] )
150
150
}
151
151
& Menu :: EditEntry ( index) => {
152
- let ref selected_entry = safe. get_entry_decrypted ( index) ;
152
+ let selected_entry = safe. get_entry_decrypted ( index) ;
153
153
self . jvm . invoke_to_channel (
154
154
& self . show_entry_cb ,
155
155
"apply" ,
156
- & vec ! [
156
+ & [
157
157
InvocationArg :: new ( & japi:: JavaEntry :: new ( & selected_entry) , "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
158
158
InvocationArg :: from ( index as i32 ) ,
159
159
InvocationArg :: from ( true ) ,
@@ -164,13 +164,13 @@ impl AsyncEditor for AndroidImpl {
164
164
self . jvm . invoke_to_channel (
165
165
& self . show_menu_cb ,
166
166
"apply" ,
167
- & vec ! [ InvocationArg :: from( Menu :: ExportEntries . get_name( ) ) ] )
167
+ & [ InvocationArg :: from ( Menu :: ExportEntries . get_name ( ) ) ] )
168
168
}
169
169
& Menu :: ImportEntries => {
170
170
self . jvm . invoke_to_channel (
171
171
& self . show_menu_cb ,
172
172
"apply" ,
173
- & vec ! [ InvocationArg :: from( Menu :: ImportEntries . get_name( ) ) ] )
173
+ & [ InvocationArg :: from ( Menu :: ImportEntries . get_name ( ) ) ] )
174
174
}
175
175
& Menu :: ShowConfiguration => {
176
176
let conf_strings = vec ! [
@@ -181,13 +181,13 @@ impl AsyncEditor for AndroidImpl {
181
181
self . jvm . invoke_to_channel (
182
182
& self . edit_configuration_cb ,
183
183
"apply" ,
184
- & vec ! [ InvocationArg :: from( ( conf_strings. as_slice( ) , & self . jvm) ) ] )
184
+ & [ InvocationArg :: from ( ( conf_strings. as_slice ( ) , & self . jvm ) ) ] )
185
185
}
186
186
& Menu :: Current => {
187
187
self . jvm . invoke_to_channel (
188
188
& self . show_menu_cb ,
189
189
"apply" ,
190
- & vec ! [ InvocationArg :: from( Menu :: Current . get_name( ) ) ] )
190
+ & [ InvocationArg :: from ( Menu :: Current . get_name ( ) ) ] )
191
191
}
192
192
other => {
193
193
panic ! ( "Menu '{:?}' cannot be used with Entries. Please, consider opening a bug \
@@ -205,7 +205,7 @@ impl AsyncEditor for AndroidImpl {
205
205
let instance_receiver = self . jvm . invoke_to_channel (
206
206
& self . show_menu_cb ,
207
207
"apply" ,
208
- & vec ! [ InvocationArg :: from( Menu :: Exit . get_name( ) ) ] ) ;
208
+ & [ InvocationArg :: from ( Menu :: Exit . get_name ( ) ) ] ) ;
209
209
210
210
japi:: handle_instance_receiver_result ( instance_receiver)
211
211
} else {
@@ -228,7 +228,7 @@ impl AsyncEditor for AndroidImpl {
228
228
let instance_receiver = self . jvm . invoke_to_channel (
229
229
& self . show_message_cb ,
230
230
"apply" ,
231
- & vec ! [
231
+ & [
232
232
InvocationArg :: from ( (
233
233
java_user_options. as_slice ( ) ,
234
234
"org.astonbitecode.rustkeylock.api.JavaUserOption" ,
0 commit comments