Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

fix(ci): the two lints clippy raises on the tree, so a tag's CI is green

Jareer937df14994a9
diff --git a/src/crates/concat-speech/src/chatterbox.rs b/src/crates/concat-speech/src/chatterbox.rs
index de9c70df..7714adf3 100644
--- a/src/crates/concat-speech/src/chatterbox.rs
+++ b/src/crates/concat-speech/src/chatterbox.rs
@@ -551,7 +551,9 @@ impl Engine {
let mut embeds = voice.features.1.clone();
embeds.extend_from_slice(&text_embeds);
let mut seq_len = embeds.len() / width;
- let mut total_len = seq_len;
+ // The prompt: the recording's tokens and the text's, which every
+ // step's mask covers along with one token per step before it.
+ let prompt_len = seq_len;
let mut position = 0usize;
let mut cache: Vec<Option<ort::value::Value>> = (0..LAYERS * 2).map(|_| None).collect();
@@ -565,6 +567,7 @@ impl Engine {
if cancel.load(Ordering::Relaxed) {
return Err("speech generation cancelled".to_owned());
}
+ let total_len = prompt_len + step;
let mut inputs: Vec<Fed> = Vec::with_capacity(3 + LAYERS * 2);
inputs.push(feed(
"inputs_embeds",
@@ -632,7 +635,6 @@ impl Engine {
let (_, next_embed) = embed_ids(&mut embed, &[next])?;
embeds = next_embed;
seq_len = 1;
- total_len += 1;
}
Ok(spoken(&generated))
}
diff --git a/src/crates/concat/src/panes/media_bin.rs b/src/crates/concat/src/panes/media_bin.rs
index 264b0120..d2de25cd 100644
--- a/src/crates/concat/src/panes/media_bin.rs
+++ b/src/crates/concat/src/panes/media_bin.rs
@@ -290,7 +290,7 @@ impl MediaBin {
match self.sort {
// Added: the import order, as the document keeps it.
0 => {}
- 1 => visible.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())),
+ 1 => visible.sort_by_key(|item| item.name.to_lowercase()),
// Video, then audio, then stills; each by name.
2 => visible.sort_by(|a, b| {
let rank = |kind: model::MediaKind| match kind {