Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: flatten file structure #33

Merged
merged 2 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading