Skip to content

Commit 95cad3c

Browse files
fix CI
1 parent 166d2a8 commit 95cad3c

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

crates/iceberg/src/io/storage.rs

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717

1818
use std::future::Future;
1919
use std::pin::Pin;
20-
#[cfg(any(
21-
feature = "storage-s3",
22-
feature = "storage-gcs",
23-
feature = "storage-oss",
24-
feature = "storage-azdls",
25-
))]
2620
use std::sync::Arc;
2721

2822
use opendal::layers::RetryLayer;
@@ -150,10 +144,32 @@ impl Storage {
150144
}
151145
}
152146
// Update doc on [`FileIO`] when adding new schemes.
147+
#[cfg(not(any(
148+
feature = "storage-memory",
149+
feature = "storage-fs",
150+
feature = "storage-s3",
151+
feature = "storage-gcs",
152+
feature = "storage-oss",
153+
feature = "storage-azdls"
154+
)))]
153155
_ => {
154156
return Err(Error::new(
155157
ErrorKind::FeatureUnsupported,
156-
format!("Constructing file io from scheme: {scheme} not supported now",),
158+
"No storage service has been enabled".to_string(),
159+
));
160+
}
161+
#[cfg(any(
162+
feature = "storage-memory",
163+
feature = "storage-fs",
164+
feature = "storage-s3",
165+
feature = "storage-gcs",
166+
feature = "storage-oss",
167+
feature = "storage-azdls"
168+
))]
169+
_ => {
170+
return Err(Error::new(
171+
ErrorKind::FeatureUnsupported,
172+
format!("Constructing file io from scheme: {scheme} not supported now"),
157173
));
158174
}
159175
};

0 commit comments

Comments
 (0)