Skip to content

Commit 9004155

Browse files
cfsmp3claude
andcommitted
Fix Rust formatting and clippy issues
- Apply cargo fmt to decoder/mod.rs - Fix clippy manual_flatten warning in build.rs by using .flatten() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 41fb966 commit 9004155

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/rust/build.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,11 @@ fn main() {
103103
if std::path::Path::new(cellar_ffmpeg).exists() {
104104
// Find the FFmpeg version directory
105105
if let Ok(entries) = std::fs::read_dir(cellar_ffmpeg) {
106-
for entry in entries {
107-
if let Ok(entry) = entry {
108-
let include_path = entry.path().join("include");
109-
if include_path.exists() {
110-
builder =
111-
builder.clang_arg(format!("-I{}", include_path.display()));
112-
break;
113-
}
106+
for entry in entries.flatten() {
107+
let include_path = entry.path().join("include");
108+
if include_path.exists() {
109+
builder = builder.clang_arg(format!("-I{}", include_path.display()));
110+
break;
114111
}
115112
}
116113
}

src/rust/src/decoder/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,7 @@ impl DtvccRust {
517517
if let Some(decoder) = &mut self.decoders[i] {
518518
// Check if there's content to flush: either cc_count > 0 (already printed)
519519
// or any window has visible content (needs to be printed during flush)
520-
let has_visible_windows = decoder
521-
.windows
522-
.iter()
523-
.any(|w| is_true(w.visible));
520+
let has_visible_windows = decoder.windows.iter().any(|w| is_true(w.visible));
524521
if decoder.cc_count > 0 || has_visible_windows {
525522
self.flush_decoder(i);
526523
}

0 commit comments

Comments
 (0)