restruct: 30e

This commit is contained in:
i do not exist 2026-06-24 10:18:45 +03:00
parent 8b6ab2fd08
commit c737c7d839
13 changed files with 771 additions and 747 deletions

View file

@ -135,7 +135,7 @@ impl Action {
}
pub fn tek_project_new (
jack: &Jack,
jack: &Jack<'static>,
clock: Clock,
left_from: &[impl AsRef<str>],
left_to: &[impl AsRef<str>],
@ -154,9 +154,7 @@ pub fn tek_project_new (
let right_tos = Connect::collect(right_to, empty, empty);
let _audio_froms = &[left_froms.as_slice(), right_froms.as_slice()];
let _audio_tos = &[left_tos.as_slice(), right_tos.as_slice()];
// Create initial project:
let mut project = Arrangement::new(
Ok(Arrangement::new(
jack,
None,
clock,
@ -168,8 +166,7 @@ pub fn tek_project_new (
Connect::collect(&midi_to, &[] as &[&str], &midi_to_re).iter().enumerate()
.map(|(index, connect)|jack.midi_out(&format!("{index}/M"), &[connect.clone()]))
.collect::<Result<Vec<_>, _>>()?
);
Ok(project)
))
}
pub fn tek_show_version () {

View file

@ -37,7 +37,7 @@ impl Config {
const CONFIG: &'static str = "tek.edn";
const DEFAULTS: &'static str = include_str!("../tek.edn");
pub fn watch <T> (callback: impl Fn(Self)->T) -> Usually<T> {
pub fn watch <T> (callback: impl FnOnce(Self)->T) -> Usually<T> {
let config = Self::init_new(None)?;
let result = callback(config);
Ok(result)