Skip to content

Apache DataFusion SQL Query Engine

fix: box aws-config loading future avoid clippy warning (#24175)

Neil Conway1cb89d2b8134
diff --git a/datafusion-cli/src/object_storage.rs b/datafusion-cli/src/object_storage.rs
index e2ba992961..5e6337e303 100644
--- a/datafusion-cli/src/object_storage.rs
+++ b/datafusion-cli/src/object_storage.rs
@@ -180,7 +180,10 @@ struct CredentialsFromConfig {
impl CredentialsFromConfig {
/// Attempt find AWS S3 credentials via the AWS SDK
pub async fn try_new() -> Result<Self> {
- let config = aws_config::defaults(BehaviorVersion::latest()).load().await;
+ // Loading the SDK config produces a large future, so box it to avoid
+ // potentially triggering the `large_futures` clippy lint.
+ let config =
+ Box::pin(aws_config::defaults(BehaviorVersion::latest()).load()).await;
let region = config.region().map(|r| r.to_string());
let credentials = config