File tree 4 files changed +5
-6
lines changed
grammers-client/src/client
4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -293,8 +293,7 @@ impl ProfilePhotoIter {
293
293
iter. request . offset += photos. len ( ) as i32 ;
294
294
}
295
295
296
- iter. buffer
297
- . extend ( photos. into_iter ( ) . map ( |x| Photo :: from_raw ( x) ) ) ;
296
+ iter. buffer . extend ( photos. into_iter ( ) . map ( Photo :: from_raw) ) ;
298
297
299
298
Ok ( total)
300
299
}
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ impl Client {
182
182
continue ;
183
183
}
184
184
185
- let sleep = pin ! ( async { sleep_until( deadline. into ( ) ) . await } ) ;
185
+ let sleep = pin ! ( async { sleep_until( deadline) . await } ) ;
186
186
let step = pin ! ( async { self . step( ) . await } ) ;
187
187
188
188
match select ( sleep, step) . await {
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ impl Timeout {
72
72
pub async fn sleep ( duration : Duration ) {
73
73
#[ cfg( not( all( target_arch = "wasm32" , target_os = "unknown" ) ) ) ]
74
74
{
75
- return tokio:: time:: sleep ( duration) . await ;
75
+ tokio:: time:: sleep ( duration) . await ;
76
76
}
77
77
#[ cfg( all( target_arch = "wasm32" , target_os = "unknown" ) ) ]
78
78
{
@@ -84,7 +84,7 @@ pub async fn sleep(duration: Duration) {
84
84
pub async fn sleep_until ( deadline : Instant ) {
85
85
#[ cfg( not( all( target_arch = "wasm32" , target_os = "unknown" ) ) ) ]
86
86
{
87
- return tokio:: time:: sleep_until ( deadline. into ( ) ) . await ;
87
+ tokio:: time:: sleep_until ( deadline. into ( ) ) . await ;
88
88
}
89
89
#[ cfg( all( target_arch = "wasm32" , target_os = "unknown" ) ) ]
90
90
{
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl Session {
169
169
}
170
170
171
171
pub fn get_dcs ( & self ) -> Vec < enums:: DataCenter > {
172
- self . session . lock ( ) . unwrap ( ) . dcs . iter ( ) . cloned ( ) . collect ( )
172
+ self . session . lock ( ) . unwrap ( ) . dcs . to_vec ( )
173
173
}
174
174
175
175
#[ must_use]
You can’t perform that action at this time.
0 commit comments