Commit 47fe23b
chore: clippy and parser-style cleanups (no behavior change)
Three small drive-by cleanups picked up by clippy on touched files; none
changes behavior.
src/backend/whisper_diarization.rs:
src/tests/conformance_harness.rs (parse_srt_time_for_fixture):
- Replace the `else if let Some(pos) = value.rfind('.') { ... } else { return None; }`
branch with `let pos = value.rfind('.')?;` collapsing the fallback
millisecond-separator handling into a single ? returning None.
Both copies of the SRT timestamp parser now match.
tests/metamorphic_audio_tests.rs:
- Annotate the silence-generator helper `generate_silence` with
`#[allow(dead_code)]` so the no-op metamorphic case (which leaves
silence generation for a future scenario) compiles without a warning.
- Replace `std::iter::repeat(0.0).take(n)` with `std::iter::repeat_n(0.0, n)`
per clippy::manual_repeat_n on Rust 1.82+.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4f54fbd commit 47fe23b
3 files changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
313 | 311 | | |
314 | | - | |
| 312 | + | |
| 313 | + | |
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
697 | | - | |
698 | 696 | | |
699 | | - | |
| 697 | + | |
| 698 | + | |
700 | 699 | | |
701 | 700 | | |
702 | 701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments