File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ struct Record {
142142fn encode_crates(
143143 conn : & mut AsyncPgConnection ,
144144 data : Vec < Record > ,
145- ) -> impl Future < Output = AppResult < Vec < EncodableCrate > > > {
145+ ) -> impl Future < Output = AppResult < Vec < EncodableCrate > > > + use<> {
146146 let crate_ids = data
147147 . iter ( )
148148 . map ( |record| record. krate . id )
Original file line number Diff line number Diff line change @@ -247,12 +247,12 @@ mod tests {
247247 . unwrap ( )
248248 }
249249
250- fn create_version (
250+ fn create_version < T : Into < Cow < ' static , str > > > (
251251 conn : & mut AsyncPgConnection ,
252252 crate_id : i32 ,
253- version : impl Into < Cow < ' static , str > > ,
253+ version : T ,
254254 publish_time : DateTime < Utc > ,
255- ) -> impl Future < Output = i32 > {
255+ ) -> impl Future < Output = i32 > + use < T > {
256256 let version = version. into ( ) ;
257257 let future = diesel:: insert_into ( versions:: table)
258258 . values ( (
Original file line number Diff line number Diff line change @@ -211,11 +211,11 @@ mod tests {
211211 assert_debug_snapshot ! ( new_crates. iter( ) . map( |u| & u. name) . collect:: <Vec <_>>( ) ) ;
212212 }
213213
214- fn create_crate (
214+ fn create_crate < T : Into < Cow < ' static , str > > > (
215215 conn : & mut AsyncPgConnection ,
216- name : impl Into < Cow < ' static , str > > ,
216+ name : T ,
217217 publish_time : DateTime < Utc > ,
218- ) -> impl Future < Output = i32 > {
218+ ) -> impl Future < Output = i32 > + use < T > {
219219 let future = diesel:: insert_into ( crates:: table)
220220 . values ( (
221221 crates:: name. eq ( name. into ( ) ) ,
Original file line number Diff line number Diff line change @@ -237,12 +237,12 @@ mod tests {
237237 . unwrap ( )
238238 }
239239
240- fn create_version (
240+ fn create_version < T : Into < Cow < ' static , str > > > (
241241 conn : & mut AsyncPgConnection ,
242242 crate_id : i32 ,
243- version : impl Into < Cow < ' static , str > > ,
243+ version : T ,
244244 publish_time : DateTime < Utc > ,
245- ) -> impl Future < Output = i32 > {
245+ ) -> impl Future < Output = i32 > + use < T > {
246246 let version = version. into ( ) ;
247247 let future = diesel:: insert_into ( versions:: table)
248248 . values ( (
You can’t perform that action at this time.
0 commit comments