Skip to content

Commit

Permalink
refactor: string construction
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Jan 17, 2025
1 parent 99978cf commit 393d374
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
18 changes: 6 additions & 12 deletions src/storage/azure_blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,8 @@ impl ObjectStorage for BlobStore {
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>();
for user in users {
let user_dashboard_path = object_store::path::Path::from(format!(
"{}/{}/{}",
USERS_ROOT_DIR, user, "dashboards"
));
let user_dashboard_path =
object_store::path::Path::from(format!("{USERS_ROOT_DIR}/{user}/dashboards"));
let dashboards_path = RelativePathBuf::from(&user_dashboard_path);
let dashboard_bytes = self
.get_objects(
Expand Down Expand Up @@ -716,10 +714,8 @@ impl ObjectStorage for BlobStore {
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>();
for user in users {
let user_filters_path = object_store::path::Path::from(format!(
"{}/{}/{}",
USERS_ROOT_DIR, user, "filters"
));
let user_filters_path =
object_store::path::Path::from(format!("{USERS_ROOT_DIR}/{user}/filters",));
let resp = self
.client
.list_with_delimiter(Some(&user_filters_path))
Expand Down Expand Up @@ -767,10 +763,8 @@ impl ObjectStorage for BlobStore {
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>();
for user in users {
let user_correlation_path = object_store::path::Path::from(format!(
"{}/{}/{}",
USERS_ROOT_DIR, user, "correlations"
));
let user_correlation_path =
object_store::path::Path::from(format!("{USERS_ROOT_DIR}/{user}/correlations"));
let correlations_path = RelativePathBuf::from(&user_correlation_path);
let correlation_bytes = self
.get_objects(
Expand Down
18 changes: 6 additions & 12 deletions src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,10 +811,8 @@ impl ObjectStorage for S3 {
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>();
for user in users {
let user_dashboard_path = object_store::path::Path::from(format!(
"{}/{}/{}",
USERS_ROOT_DIR, user, "dashboards"
));
let user_dashboard_path =
object_store::path::Path::from(format!("{USERS_ROOT_DIR}/{user}/dashboards"));
let dashboards_path = RelativePathBuf::from(&user_dashboard_path);
let dashboard_bytes = self
.get_objects(
Expand Down Expand Up @@ -849,10 +847,8 @@ impl ObjectStorage for S3 {
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>();
for user in users {
let user_filters_path = object_store::path::Path::from(format!(
"{}/{}/{}",
USERS_ROOT_DIR, user, "filters"
));
let user_filters_path =
object_store::path::Path::from(format!("{USERS_ROOT_DIR}/{user}/filters",));
let resp = self
.client
.list_with_delimiter(Some(&user_filters_path))
Expand Down Expand Up @@ -900,10 +896,8 @@ impl ObjectStorage for S3 {
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>();
for user in users {
let user_correlation_path = object_store::path::Path::from(format!(
"{}/{}/{}",
USERS_ROOT_DIR, user, "correlations"
));
let user_correlation_path =
object_store::path::Path::from(format!("{USERS_ROOT_DIR}/{user}/correlations",));
let correlations_path = RelativePathBuf::from(&user_correlation_path);
let correlation_bytes = self
.get_objects(
Expand Down

0 comments on commit 393d374

Please sign in to comment.