Skip to content

Commit 4afa91f

Browse files
committed
chore(ci): fix ci errors
1 parent 4be5301 commit 4afa91f

2 files changed

Lines changed: 11 additions & 34 deletions

File tree

data/src/streaming.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl XetReader {
205205
let config = config.clone();
206206
let merkle_hash = self.merkle_hash;
207207
let file_hash = self.file_hash.clone();
208-
let file_range = self.file_range.clone();
208+
let file_range = self.file_range;
209209
let progress_updater = self.progress_updater.take();
210210
let handle = tokio::spawn(async move {
211211
let downloader = match FileDownloader::new(config).await {
@@ -239,16 +239,16 @@ impl Stream for XetReader {
239239

240240
ReaderState::Streaming { rx, handle } => {
241241
// Check the task handle first for early error detection.
242-
if let Some(h) = handle {
243-
if let Poll::Ready(result) = Pin::new(h).poll(cx) {
244-
let result = result.expect("download task panicked");
245-
match result {
246-
Ok(_) => *handle = None,
247-
Err(e) => {
248-
this.state = ReaderState::Completed;
249-
return Poll::Ready(Some(Err(e)));
250-
},
251-
}
242+
if let Some(h) = handle
243+
&& let Poll::Ready(result) = Pin::new(h).poll(cx)
244+
{
245+
let result = result.expect("download task panicked");
246+
match result {
247+
Ok(_) => *handle = None,
248+
Err(e) => {
249+
this.state = ReaderState::Completed;
250+
return Poll::Ready(Some(Err(e)));
251+
},
252252
}
253253
}
254254

hf_xet/Cargo.lock

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)