Skip to content

Commit

Permalink
style: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
timvw committed Mar 27, 2024
1 parent 54ea518 commit 6b361fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use aws_config::BehaviorVersion;
use aws_credential_types::provider::ProvideCredentials;
use clap::Parser;
use datafusion::catalog::TableReference;
use std::env;
use std::sync::Arc;
use aws_config::BehaviorVersion;
use aws_credential_types::provider::ProvideCredentials;

use aws_types::SdkConfig;

Expand All @@ -24,9 +24,10 @@ use opendal::Operator;
use url::Url;

async fn init_s3_operator_via_builder(url: &Url, sdk_config: &SdkConfig) -> Result<Operator> {

let cp = sdk_config.credentials_provider().unwrap();
let creds = cp.provide_credentials().await
let creds = cp
.provide_credentials()
.await
.map_err(|e| DataFusionError::Execution(format!("Failed to get credentials: {e}")))?;

let mut builder = S3::default();
Expand Down Expand Up @@ -62,7 +63,6 @@ async fn main() -> Result<()> {

let sdk_config = get_sdk_config(&args).await;


if data_path.starts_with("s3://") {
let s3_url = Url::parse(data_path)
.map_err(|e| DataFusionError::Execution(format!("Failed to parse url, {e}")))?;
Expand Down

0 comments on commit 6b361fb

Please sign in to comment.