@@ -59,7 +59,7 @@ impl AsyncEditor for AndroidImpl {
5959 let instance_receiver = self . jvm . invoke_to_channel (
6060 & self . show_menu_cb ,
6161 "apply" ,
62- & vec ! [ InvocationArg :: from( try_pass_menu_name) ] ) ;
62+ & [ InvocationArg :: from ( try_pass_menu_name) ] ) ;
6363 debug ! ( "Waiting for password..." ) ;
6464 japi:: handle_instance_receiver_result ( instance_receiver)
6565 }
@@ -70,7 +70,7 @@ impl AsyncEditor for AndroidImpl {
7070 let instance_receiver = self . jvm . invoke_to_channel (
7171 & self . show_menu_cb ,
7272 "apply" ,
73- & vec ! [ InvocationArg :: from( change_pass_menu_name) ] ) ;
73+ & [ InvocationArg :: from ( change_pass_menu_name) ] ) ;
7474 debug ! ( "Waiting for password..." ) ;
7575 japi:: handle_instance_receiver_result ( instance_receiver)
7676 }
@@ -89,21 +89,21 @@ impl AsyncEditor for AndroidImpl {
8989 self . jvm . invoke_to_channel (
9090 & self . show_menu_cb ,
9191 "apply" ,
92- & vec ! [ InvocationArg :: from( Menu :: Main . get_name( ) ) ] )
92+ & [ InvocationArg :: from ( Menu :: Main . get_name ( ) ) ] )
9393 }
9494 & Menu :: EntriesList ( _) => {
9595 let java_entries: Vec < japi:: JavaEntry > = safe. get_entries ( ) . iter ( )
9696 . map ( |entry| japi:: JavaEntry :: new ( entry) )
9797 . collect ( ) ;
98- let filter = if safe. get_filter ( ) . len ( ) == 0 {
98+ let filter = if safe. get_filter ( ) . is_empty ( ) {
9999 "null" . to_string ( )
100100 } else {
101101 safe. get_filter ( ) . clone ( )
102102 } ;
103103 self . jvm . invoke_to_channel (
104104 & self . show_entries_set_cb ,
105105 "apply" ,
106- & vec ! [
106+ & [
107107 InvocationArg :: from ( (
108108 java_entries. as_slice ( ) ,
109109 "org.astonbitecode.rustkeylock.api.JavaEntry" ,
@@ -115,7 +115,7 @@ impl AsyncEditor for AndroidImpl {
115115 self . jvm . invoke_to_channel (
116116 & self . show_entry_cb ,
117117 "apply" ,
118- & vec ! [
118+ & [
119119 InvocationArg :: new ( & japi:: JavaEntry :: new ( & entry) , "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
120120 InvocationArg :: from ( index as i32 ) ,
121121 InvocationArg :: from ( false ) ,
@@ -128,7 +128,7 @@ impl AsyncEditor for AndroidImpl {
128128 self . jvm . invoke_to_channel (
129129 & self . show_entry_cb ,
130130 "apply" ,
131- & vec ! [
131+ & [
132132 InvocationArg :: new ( & entry, "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
133133 InvocationArg :: from ( index as i32 ) ,
134134 InvocationArg :: from ( false ) ,
@@ -141,19 +141,19 @@ impl AsyncEditor for AndroidImpl {
141141 self . jvm . invoke_to_channel (
142142 & self . show_entry_cb ,
143143 "apply" ,
144- & vec ! [
144+ & [
145145 InvocationArg :: new ( & empty_entry, "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
146146 InvocationArg :: from ( -1 ) ,
147147 InvocationArg :: from ( true ) ,
148148 InvocationArg :: from ( false )
149149 ] )
150150 }
151151 & Menu :: EditEntry ( index) => {
152- let ref selected_entry = safe. get_entry_decrypted ( index) ;
152+ let selected_entry = safe. get_entry_decrypted ( index) ;
153153 self . jvm . invoke_to_channel (
154154 & self . show_entry_cb ,
155155 "apply" ,
156- & vec ! [
156+ & [
157157 InvocationArg :: new ( & japi:: JavaEntry :: new ( & selected_entry) , "org.astonbitecode.rustkeylock.api.JavaEntry" ) ,
158158 InvocationArg :: from ( index as i32 ) ,
159159 InvocationArg :: from ( true ) ,
@@ -164,13 +164,13 @@ impl AsyncEditor for AndroidImpl {
164164 self . jvm . invoke_to_channel (
165165 & self . show_menu_cb ,
166166 "apply" ,
167- & vec ! [ InvocationArg :: from( Menu :: ExportEntries . get_name( ) ) ] )
167+ & [ InvocationArg :: from ( Menu :: ExportEntries . get_name ( ) ) ] )
168168 }
169169 & Menu :: ImportEntries => {
170170 self . jvm . invoke_to_channel (
171171 & self . show_menu_cb ,
172172 "apply" ,
173- & vec ! [ InvocationArg :: from( Menu :: ImportEntries . get_name( ) ) ] )
173+ & [ InvocationArg :: from ( Menu :: ImportEntries . get_name ( ) ) ] )
174174 }
175175 & Menu :: ShowConfiguration => {
176176 let conf_strings = vec ! [
@@ -181,13 +181,13 @@ impl AsyncEditor for AndroidImpl {
181181 self . jvm . invoke_to_channel (
182182 & self . edit_configuration_cb ,
183183 "apply" ,
184- & vec ! [ InvocationArg :: from( ( conf_strings. as_slice( ) , & self . jvm) ) ] )
184+ & [ InvocationArg :: from ( ( conf_strings. as_slice ( ) , & self . jvm ) ) ] )
185185 }
186186 & Menu :: Current => {
187187 self . jvm . invoke_to_channel (
188188 & self . show_menu_cb ,
189189 "apply" ,
190- & vec ! [ InvocationArg :: from( Menu :: Current . get_name( ) ) ] )
190+ & [ InvocationArg :: from ( Menu :: Current . get_name ( ) ) ] )
191191 }
192192 other => {
193193 panic ! ( "Menu '{:?}' cannot be used with Entries. Please, consider opening a bug \
@@ -205,7 +205,7 @@ impl AsyncEditor for AndroidImpl {
205205 let instance_receiver = self . jvm . invoke_to_channel (
206206 & self . show_menu_cb ,
207207 "apply" ,
208- & vec ! [ InvocationArg :: from( Menu :: Exit . get_name( ) ) ] ) ;
208+ & [ InvocationArg :: from ( Menu :: Exit . get_name ( ) ) ] ) ;
209209
210210 japi:: handle_instance_receiver_result ( instance_receiver)
211211 } else {
@@ -228,7 +228,7 @@ impl AsyncEditor for AndroidImpl {
228228 let instance_receiver = self . jvm . invoke_to_channel (
229229 & self . show_message_cb ,
230230 "apply" ,
231- & vec ! [
231+ & [
232232 InvocationArg :: from ( (
233233 java_user_options. as_slice ( ) ,
234234 "org.astonbitecode.rustkeylock.api.JavaUserOption" ,
0 commit comments