@@ -109,28 +109,28 @@ async fn main() -> Result<(), Error> {
109
109
StoreArgs :: from_arg_matches ( matches) . map_err ( |e| Error :: new ( & e. to_string ( ) ) ) ?;
110
110
let attributes = parse_attributes ( & args. attributes ) ?;
111
111
112
- store ( & args. label , attributes) . await
112
+ store ( & args. label , & attributes) . await
113
113
}
114
114
Some ( ( "lookup" , matches) ) => {
115
115
let args =
116
116
LookupArgs :: from_arg_matches ( matches) . map_err ( |e| Error :: new ( & e. to_string ( ) ) ) ?;
117
117
let attributes = parse_attributes ( & args. attributes ) ?;
118
118
119
- lookup ( attributes) . await
119
+ lookup ( & attributes) . await
120
120
}
121
121
Some ( ( "search" , matches) ) => {
122
122
let args =
123
123
SearchArgs :: from_arg_matches ( matches) . map_err ( |e| Error :: new ( & e. to_string ( ) ) ) ?;
124
124
let attributes = parse_attributes ( & args. attributes ) ?;
125
125
126
- search ( attributes, args. all ) . await
126
+ search ( & attributes, args. all ) . await
127
127
}
128
128
Some ( ( "delete" , matches) ) => {
129
129
let args =
130
130
LookupArgs :: from_arg_matches ( matches) . map_err ( |e| Error :: new ( & e. to_string ( ) ) ) ?;
131
131
let attributes = parse_attributes ( & args. attributes ) ?;
132
132
133
- delete ( attributes) . await
133
+ delete ( & attributes) . await
134
134
}
135
135
Some ( ( "lock" , _matches) ) => lock ( ) . await ,
136
136
Some ( ( "unlock" , _matches) ) => unlock ( ) . await ,
@@ -158,7 +158,7 @@ fn parse_attributes(attributes: &[String]) -> Result<HashMap<&str, &str>, Error>
158
158
}
159
159
}
160
160
161
- async fn store ( label : & str , attributes : HashMap < & str , & str > ) -> Result < ( ) , Error > {
161
+ async fn store ( label : & str , attributes : & HashMap < & str , & str > ) -> Result < ( ) , Error > {
162
162
let collection = collection ( ) . await ?;
163
163
164
164
print ! ( "Type a secret: " ) ;
@@ -174,7 +174,7 @@ async fn store(label: &str, attributes: HashMap<&str, &str>) -> Result<(), Error
174
174
Ok ( ( ) )
175
175
}
176
176
177
- async fn lookup ( attributes : HashMap < & str , & str > ) -> Result < ( ) , Error > {
177
+ async fn lookup ( attributes : & HashMap < & str , & str > ) -> Result < ( ) , Error > {
178
178
let collection = collection ( ) . await ?;
179
179
let items = collection. search_items ( attributes) . await ?;
180
180
@@ -188,7 +188,7 @@ async fn lookup(attributes: HashMap<&str, &str>) -> Result<(), Error> {
188
188
Ok ( ( ) )
189
189
}
190
190
191
- async fn search ( attributes : HashMap < & str , & str > , all : bool ) -> Result < ( ) , Error > {
191
+ async fn search ( attributes : & HashMap < & str , & str > , all : bool ) -> Result < ( ) , Error > {
192
192
let collection = collection ( ) . await ?;
193
193
let items = collection. search_items ( attributes) . await ?;
194
194
@@ -203,7 +203,7 @@ async fn search(attributes: HashMap<&str, &str>, all: bool) -> Result<(), Error>
203
203
Ok ( ( ) )
204
204
}
205
205
206
- async fn delete ( attributes : HashMap < & str , & str > ) -> Result < ( ) , Error > {
206
+ async fn delete ( attributes : & HashMap < & str , & str > ) -> Result < ( ) , Error > {
207
207
let collection = collection ( ) . await ?;
208
208
let items = collection. search_items ( attributes) . await ?;
209
209
0 commit comments