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