diff --git a/rust/src/delta_config.rs b/rust/src/delta_config.rs index cf886c16dd..2042c0aabf 100644 --- a/rust/src/delta_config.rs +++ b/rust/src/delta_config.rs @@ -98,7 +98,7 @@ impl DeltaConfig { .configuration .get(&self.key) .and_then(|opt| opt.as_deref()) - .unwrap_or_else(|| self.default.as_str()) + .unwrap_or(self.default.as_str()) .to_string() } } diff --git a/rust/src/storage/s3/mod.rs b/rust/src/storage/s3/mod.rs index c4586f0fc1..ac423f8555 100644 --- a/rust/src/storage/s3/mod.rs +++ b/rust/src/storage/s3/mod.rs @@ -722,7 +722,7 @@ impl StorageBackend for S3StorageBackend { .next_continuation_token .map(|t| ContinuationToken::Value(Some(t))) .unwrap_or(ContinuationToken::End); - ctx.obj_iter = result.contents.unwrap_or_else(Vec::new).into_iter(); + ctx.obj_iter = result.contents.unwrap_or_default().into_iter(); ctx.obj_iter .next() .map(|obj| (try_object_meta_from(&ctx.bucket, obj), ctx))