Skip to content

Commit a845327

Browse files
authored
fix: compilation failure when only storage-fs feature included (#1304)
## Which issue does this PR close? - Closes #1303 ## What changes are included in this PR? This PR makes return type `Return<>` explicit. ## Are these changes tested? I included a reproduction environment on the issue, and verify it compiles with no issue after my fix.
1 parent b81e824 commit a845327

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/iceberg/src/io/storage.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,19 @@ impl Storage {
102102
#[cfg(feature = "storage-memory")]
103103
Storage::Memory(op) => {
104104
if let Some(stripped) = path.strip_prefix("memory:/") {
105-
Ok((op.clone(), stripped))
105+
Ok::<_, crate::Error>((op.clone(), stripped))
106106
} else {
107-
Ok((op.clone(), &path[1..]))
107+
Ok::<_, crate::Error>((op.clone(), &path[1..]))
108108
}
109109
}
110110
#[cfg(feature = "storage-fs")]
111111
Storage::LocalFs => {
112112
let op = super::fs_config_build()?;
113113

114114
if let Some(stripped) = path.strip_prefix("file:/") {
115-
Ok((op, stripped))
115+
Ok::<_, crate::Error>((op, stripped))
116116
} else {
117-
Ok((op, &path[1..]))
117+
Ok::<_, crate::Error>((op, &path[1..]))
118118
}
119119
}
120120
#[cfg(feature = "storage-s3")]

0 commit comments

Comments
 (0)