From 9b42e8737b708cc52c84e9f9a11f62097d525839 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sun, 27 Feb 2022 22:01:53 -0800 Subject: [PATCH] fix clippy warnings --- rust/src/delta_config.rs | 2 +- rust/src/storage/s3/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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))