Feat: cleanup

This commit is contained in:
2026-02-22 13:28:03 +01:00
parent 3093b40dbc
commit 3d552ec072
26 changed files with 213 additions and 181 deletions

View File

@@ -117,17 +117,14 @@ pub fn copy_steps(
bank: usize,
pattern: usize,
indices: &[usize],
) -> (CopiedSteps, Vec<String>) {
) -> CopiedSteps {
let pat = project.pattern_at(bank, pattern);
let mut steps = Vec::new();
let mut scripts = Vec::new();
for &idx in indices {
if let Some(step) = pat.step(idx) {
let resolved = pat.resolve_script(idx).unwrap_or("").to_string();
scripts.push(resolved.clone());
steps.push(CopiedStepData {
script: resolved,
script: pat.resolve_script(idx).unwrap_or("").to_string(),
active: step.active,
source: step.source,
original_index: idx,
@@ -136,12 +133,11 @@ pub fn copy_steps(
}
}
let copied = CopiedSteps {
CopiedSteps {
bank,
pattern,
steps,
};
(copied, scripts)
}
}
pub struct PasteResult {