Skip to content

Commit 356dc8b

Browse files
committed
Minimal tokio features
1 parent 05c4fe1 commit 356dc8b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ num_enum = "0.7.3"
1818
object_store = { version = "0.12", optional = true }
1919
reqwest = { version = "0.12", default-features = false, optional = true }
2020
thiserror = "1"
21-
tokio = { version = "1.43.0", optional = true }
21+
tokio = { version = "1.43.0", optional = true, default-features = false, features = [
22+
"io-util",
23+
"sync",
24+
] }
2225
weezl = "0.1.0"
2326

2427
[dev-dependencies]

src/reader.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ use byteorder::{BigEndian, LittleEndian, ReadBytesExt};
99
use bytes::buf::Reader;
1010
use bytes::{Buf, Bytes};
1111
use futures::future::{BoxFuture, FutureExt};
12-
#[cfg(feature = "object_store")]
1312
use futures::TryFutureExt;
14-
#[cfg(feature = "object_store")]
15-
use object_store::ObjectStore;
1613

1714
use crate::error::{AsyncTiffError, AsyncTiffResult};
1815

@@ -122,7 +119,7 @@ impl<T: tokio::io::AsyncRead + tokio::io::AsyncSeek + Unpin + Send + Debug> Asyn
122119
#[cfg(feature = "object_store")]
123120
#[derive(Clone, Debug)]
124121
pub struct ObjectReader {
125-
store: Arc<dyn ObjectStore>,
122+
store: Arc<dyn object_store::ObjectStore>,
126123
path: object_store::path::Path,
127124
}
128125

@@ -131,7 +128,7 @@ impl ObjectReader {
131128
/// Creates a new [`ObjectReader`] for the provided [`ObjectStore`] and path
132129
///
133130
/// [`ObjectMeta`] can be obtained using [`ObjectStore::list`] or [`ObjectStore::head`]
134-
pub fn new(store: Arc<dyn ObjectStore>, path: object_store::path::Path) -> Self {
131+
pub fn new(store: Arc<dyn object_store::ObjectStore>, path: object_store::path::Path) -> Self {
135132
Self { store, path }
136133
}
137134
}

0 commit comments

Comments
 (0)