Skip to content

Commit 67ef7b1

Browse files
committed
fix: address clippy warnings and add bzip2 license to deny.toml
- Fix useless format! macro in module_impl.rs - Collapse nested if statement using let-chains - Add bzip2-1.0.6 license to allowed licenses (used by zip crate)
1 parent 0bd60d0 commit 67ef7b1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

crates/redisctl/src/commands/enterprise/module_impl.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ async fn handle_validate(file: &Path, strict: bool, output_format: OutputFormat)
592592
.with_context(|| format!("Failed to read file: {}", file.display()))?;
593593

594594
let metadata: ModuleMetadata = serde_json::from_str(&content)
595-
.with_context(|| format!("Failed to parse module.json: invalid JSON format"))?;
595+
.with_context(|| "Failed to parse module.json: invalid JSON format")?;
596596

597597
// Validate
598598
let results = validate_module_metadata(&metadata, strict);
@@ -868,11 +868,11 @@ async fn handle_package(
868868
}
869869

870870
// Create output directory if needed
871-
if let Some(parent) = output_path.parent() {
872-
if !parent.exists() {
873-
fs::create_dir_all(parent)
874-
.with_context(|| format!("Failed to create directory: {}", parent.display()))?;
875-
}
871+
if let Some(parent) = output_path.parent()
872+
&& !parent.exists()
873+
{
874+
fs::create_dir_all(parent)
875+
.with_context(|| format!("Failed to create directory: {}", parent.display()))?;
876876
}
877877

878878
// Read input files

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ allow = [
3232
"Unlicense",
3333
"Zlib",
3434
"CDLA-Permissive-2.0",
35+
"bzip2-1.0.6", # Permissive license for bzip2 (used by zip crate)
3536
]
3637

3738
confidence-threshold = 0.8

0 commit comments

Comments
 (0)