Skip to content

Commit 13f0edb

Browse files
committed
Small change & clippy
1 parent bed7f58 commit 13f0edb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/tako/src/internal/datasrv/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,6 @@ pub(crate) async fn download_manager_process<
326326
if is_empty {
327327
notify.notified().await;
328328
}
329-
while let Some(_) = join_set.try_join_next() { /* Do nothing */ }
329+
while join_set.try_join_next().is_some() { /* Do nothing */ }
330330
}
331331
}

crates/tako/src/internal/datasrv/local_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl LocalDataClient {
8181
if first {
8282
self.send_message(FromLocalDataClientMessageUp::PutDataObject {
8383
data_id,
84-
mime_type: mime_type.as_ref().map(|x| x.as_str()),
84+
mime_type: mime_type.as_deref(),
8585
size,
8686
data: PutDataUp { data },
8787
})

crates/tako/src/internal/datasrv/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub(crate) struct DataObjectComposer {
4949
impl DataObjectComposer {
5050
pub fn new(size: usize, mut data: Vec<u8>) -> Self {
5151
assert!(size >= data.len());
52-
if data.len() != size {
52+
if data.capacity() < size {
5353
data.reserve(size - data.len());
5454
}
5555
DataObjectComposer { size, data }

0 commit comments

Comments
 (0)