File tree 3 files changed +3
-3
lines changed
crates/tako/src/internal/datasrv
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,6 @@ pub(crate) async fn download_manager_process<
326
326
if is_empty {
327
327
notify. notified ( ) . await ;
328
328
}
329
- while let Some ( _ ) = join_set. try_join_next ( ) { /* Do nothing */ }
329
+ while join_set. try_join_next ( ) . is_some ( ) { /* Do nothing */ }
330
330
}
331
331
}
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl LocalDataClient {
81
81
if first {
82
82
self . send_message ( FromLocalDataClientMessageUp :: PutDataObject {
83
83
data_id,
84
- mime_type : mime_type. as_ref ( ) . map ( |x| x . as_str ( ) ) ,
84
+ mime_type : mime_type. as_deref ( ) ,
85
85
size,
86
86
data : PutDataUp { data } ,
87
87
} )
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ pub(crate) struct DataObjectComposer {
49
49
impl DataObjectComposer {
50
50
pub fn new ( size : usize , mut data : Vec < u8 > ) -> Self {
51
51
assert ! ( size >= data. len( ) ) ;
52
- if data. len ( ) != size {
52
+ if data. capacity ( ) < size {
53
53
data. reserve ( size - data. len ( ) ) ;
54
54
}
55
55
DataObjectComposer { size, data }
You can’t perform that action at this time.
0 commit comments