Skip to content

Commit

Permalink
refactor: flatten file structure (#33)
Browse files Browse the repository at this point in the history
* refactor: flatten file structure

* chore: clippy fixes
  • Loading branch information
roeap authored Jan 28, 2024
1 parent b3f1244 commit 9c48882
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 4 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/config/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub static CONFIG: Lazy<Config> = Lazy::new(|| {
}
}
builder = builder.add_source(Environment::with_prefix("DELTA_SHARING_RS").try_parsing(true));
builder.build().unwrap_or(Config::default())
builder.build().unwrap_or_default()
});

pub struct Flag<V> {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/server/routers/shares/schemas/tables/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ pub async fn post(
}
}
Platform::Gcp => {
if let Some(_) = &state.gcp_service_account {
if state.gcp_service_account.is_some() {
let creds = ServiceAccount::load_json_file(
std::env::var("GOOGLE_APPLICATION_CREDENTIALS")
.context("failed to load GCP credentials")?,
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/server/utilities/signed_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ impl Signer for AzureSigner {

let storage_account = url
.domain()
.and_then(|d| d.split_once("."))
.and_then(|d| d.split_once('.'))
.map(|m| m.0)
.unwrap_or("");
let container = url.username();
let blob = url.path().strip_prefix("/").unwrap_or("");
let blob = url.path().strip_prefix('/').unwrap_or("");

// build azure blob client
let cb = ClientBuilder::new(storage_account.to_string(), self.azure.clone());
Expand Down

0 comments on commit 9c48882

Please sign in to comment.