Skip to content

Commit a02d187

Browse files
committed
FIX: Fix Rust client Windows build
1 parent 30a76ff commit a02d187

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/historical/batch.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
//! The historical batch download API.
22
3-
use core::fmt;
43
use std::{
54
cmp::Ordering,
65
collections::HashMap,
6+
fmt,
77
fmt::Write,
88
num::NonZeroU64,
9-
os::unix::fs::MetadataExt,
109
path::{Path, PathBuf},
1110
str::FromStr,
1211
};
@@ -253,7 +252,7 @@ impl BatchClient<'_> {
253252
let Ok(metadata) = tokio::fs::metadata(path).await else {
254253
return Ok(Header::Range(None));
255254
};
256-
let actual_size = metadata.size();
255+
let actual_size = metadata.len();
257256
match actual_size.cmp(&exp_size) {
258257
Ordering::Less => {
259258
debug!(
@@ -275,7 +274,7 @@ impl BatchClient<'_> {
275274
}
276275
Ok(Header::Range(Some((
277276
"Range",
278-
format!("bytes={}-", metadata.size()),
277+
format!("bytes={}-", metadata.len()),
279278
))))
280279
}
281280

0 commit comments

Comments
 (0)