Skip to content

Commit a569f7d

Browse files
committed
format
1 parent f6c5937 commit a569f7d

File tree

1 file changed

+13
-8
lines changed
  • crates/catalog/loader/src

1 file changed

+13
-8
lines changed

crates/catalog/loader/src/lib.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::sync::Arc;
2+
23
use iceberg::{Catalog, CatalogBuilder, Error, ErrorKind, Result};
34
use iceberg_catalog_rest::RestCatalogBuilder;
45

5-
66
pub enum CatalogBuilderDef {
77
Rest(RestCatalogBuilder),
88
}
@@ -23,28 +23,33 @@ impl CatalogBuilderDef {
2323
CatalogBuilderDef::Rest(builder) => CatalogBuilderDef::Rest(builder.name(name)),
2424
}
2525
}
26-
26+
2727
pub fn uri(self, uri: impl Into<String>) -> Self {
2828
match self {
2929
CatalogBuilderDef::Rest(builder) => CatalogBuilderDef::Rest(builder.uri(uri)),
3030
}
3131
}
32-
32+
3333
pub fn warehouse(self, warehouse: impl Into<String>) -> Self {
3434
match self {
35-
CatalogBuilderDef::Rest(builder) => CatalogBuilderDef::Rest(builder.warehouse(warehouse)),
35+
CatalogBuilderDef::Rest(builder) => {
36+
CatalogBuilderDef::Rest(builder.warehouse(warehouse))
37+
}
3638
}
3739
}
38-
40+
3941
pub fn with_prop(self, key: impl Into<String>, value: impl Into<String>) -> Self {
4042
match self {
41-
CatalogBuilderDef::Rest(builder) => CatalogBuilderDef::Rest(builder.with_prop(key, value)),
43+
CatalogBuilderDef::Rest(builder) => {
44+
CatalogBuilderDef::Rest(builder.with_prop(key, value))
45+
}
4246
}
4347
}
44-
48+
4549
pub async fn build(self) -> Result<Arc<dyn Catalog>> {
4650
match self {
47-
CatalogBuilderDef::Rest(builder) => builder.build()
51+
CatalogBuilderDef::Rest(builder) => builder
52+
.build()
4853
.await
4954
.map(|c| Arc::new(c) as Arc<dyn Catalog>),
5055
}

0 commit comments

Comments
 (0)