Skip to content

Commit 4f4e38d

Browse files
author
Jan Kaul
committed
fix clippy warnings
1 parent 66d9e38 commit 4f4e38d

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

iceberg-rust/src/object_store/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ impl Bucket<'_> {
6464
#[derive(Debug, Clone)]
6565
pub enum ObjectStoreBuilder {
6666
/// AWS s3 builder
67-
S3(AmazonS3Builder),
67+
S3(Box<AmazonS3Builder>),
6868
/// Google Cloud Storage builder
69-
GCS(GoogleCloudStorageBuilder),
69+
GCS(Box<GoogleCloudStorageBuilder>),
7070
/// Filesystem builder
7171
Filesystem(Arc<LocalFileSystem>),
7272
/// In memory builder
@@ -99,11 +99,11 @@ impl FromStr for ConfigKey {
9999
impl ObjectStoreBuilder {
100100
/// Create new AWS S3 Object Store builder
101101
pub fn s3() -> Self {
102-
ObjectStoreBuilder::S3(AmazonS3Builder::from_env())
102+
ObjectStoreBuilder::S3(Box::new(AmazonS3Builder::from_env()))
103103
}
104104
/// Create new AWS S3 Object Store builder
105105
pub fn gcs() -> Self {
106-
ObjectStoreBuilder::GCS(GoogleCloudStorageBuilder::from_env())
106+
ObjectStoreBuilder::GCS(Box::new(GoogleCloudStorageBuilder::from_env()))
107107
}
108108
/// Create a new FileSystem ObjectStoreBuilder
109109
pub fn filesystem(prefix: impl AsRef<Path>) -> Self {
@@ -117,10 +117,10 @@ impl ObjectStoreBuilder {
117117
pub fn with_config(self, key: ConfigKey, value: impl Into<String>) -> Self {
118118
match (self, key) {
119119
(ObjectStoreBuilder::S3(aws), ConfigKey::AWS(key)) => {
120-
ObjectStoreBuilder::S3(aws.with_config(key, value))
120+
ObjectStoreBuilder::S3(Box::new(aws.with_config(key, value)))
121121
}
122122
(ObjectStoreBuilder::GCS(gcs), ConfigKey::GCS(key)) => {
123-
ObjectStoreBuilder::GCS(gcs.with_config(key, value))
123+
ObjectStoreBuilder::GCS(Box::new(gcs.with_config(key, value)))
124124
}
125125
(x, _) => x,
126126
}
@@ -129,15 +129,15 @@ impl ObjectStoreBuilder {
129129
pub fn build(&self, bucket: Bucket) -> Result<Arc<dyn ObjectStore>, Error> {
130130
match (bucket, self) {
131131
(Bucket::S3(bucket), Self::S3(builder)) => Ok::<_, Error>(Arc::new(
132-
builder
132+
(**builder)
133133
.clone()
134134
.with_bucket_name(bucket)
135135
.with_copy_if_not_exists(S3CopyIfNotExists::Multipart)
136136
.build()
137137
.map_err(Error::from)?,
138138
)),
139139
(Bucket::GCS(bucket), Self::GCS(builder)) => Ok::<_, Error>(Arc::new(
140-
builder
140+
(**builder)
141141
.clone()
142142
.with_bucket_name(bucket)
143143
.build()

iceberg-rust/src/sql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn find_relations(sql: &str) -> Result<Vec<String>, Error> {
1313
let statements = Parser::parse_sql(&GenericDialect, sql)?;
1414
let mut visited = Vec::new();
1515

16-
visit_relations(&statements, |relation| {
16+
let _ = visit_relations(&statements, |relation| {
1717
visited.push(relation.to_string());
1818
ControlFlow::<()>::Continue(())
1919
});

0 commit comments

Comments
 (0)