Skip to content

Commit

Permalink
Fix clippy (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsilver authored Nov 7, 2024
1 parent 0ab0c4f commit a6807f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/y-sweet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn get_store_from_opts(store_path: &str) -> Result<Box<dyn Store>> {
.ok_or_else(|| anyhow::anyhow!("Invalid S3 URL"))?
.to_owned();
let bucket_prefix = url.path().trim_start_matches('/').to_owned();
let bucket_prefix = (!bucket_prefix.is_empty()).then(|| bucket_prefix); // "" => None
let bucket_prefix = (!bucket_prefix.is_empty()).then_some(bucket_prefix); // "" => None
let config = parse_s3_config_from_env_and_args(bucket, bucket_prefix)?;
let store = S3Store::new(config);
Ok(Box::new(store))
Expand Down

0 comments on commit a6807f7

Please sign in to comment.