mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
fix some more warnings
This commit is contained in:
parent
0530e43a2f
commit
7962bdf86b
12 changed files with 15 additions and 15 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
|
#![allow(unused)]
|
||||||
#![allow(clippy::unit_arg)]
|
#![allow(clippy::unit_arg)]
|
||||||
|
|
||||||
include!("../lib.rs");
|
include!("../lib.rs");
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(unused)]
|
||||||
|
#![allow(clippy::unit_arg)]
|
||||||
include!("../lib.rs");
|
include!("../lib.rs");
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
GrooveboxCli::parse().run()
|
GrooveboxCli::parse().run()
|
||||||
|
|
@ -10,14 +12,14 @@ pub struct GrooveboxCli;
|
||||||
impl GrooveboxCli {
|
impl GrooveboxCli {
|
||||||
fn run (&self) -> Usually<()> {
|
fn run (&self) -> Usually<()> {
|
||||||
Tui::run(JackClient::new("tek_groovebox")?.activate_with(|jack|{
|
Tui::run(JackClient::new("tek_groovebox")?.activate_with(|jack|{
|
||||||
let midi_in_1 = jack.read().unwrap().register_port("in1", MidiIn::default())?;
|
let app = GrooveboxTui::try_from(jack)?;
|
||||||
let midi_out = jack.read().unwrap().register_port("out", MidiOut::default())?;
|
let midi_out = jack.read().unwrap().register_port("out", MidiOut::default())?;
|
||||||
|
let midi_in_1 = jack.read().unwrap().register_port("in1", MidiIn::default())?;
|
||||||
let midi_in_2 = jack.read().unwrap().register_port("in2", MidiIn::default())?;
|
let midi_in_2 = jack.read().unwrap().register_port("in2", MidiIn::default())?;
|
||||||
let audio_in_1 = jack.read().unwrap().register_port("inL", AudioIn::default())?;
|
let audio_in_1 = jack.read().unwrap().register_port("inL", AudioIn::default())?;
|
||||||
let audio_in_2 = jack.read().unwrap().register_port("inR", AudioIn::default())?;
|
let audio_in_2 = jack.read().unwrap().register_port("inR", AudioIn::default())?;
|
||||||
let audio_out_1 = jack.read().unwrap().register_port("out1", AudioOut::default())?;
|
let audio_out_1 = jack.read().unwrap().register_port("out1", AudioOut::default())?;
|
||||||
let audio_out_2 = jack.read().unwrap().register_port("out2", AudioOut::default())?;
|
let audio_out_2 = jack.read().unwrap().register_port("out2", AudioOut::default())?;
|
||||||
let mut app = GrooveboxTui::try_from(jack)?;
|
|
||||||
Ok(app)
|
Ok(app)
|
||||||
})?)?;
|
})?)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
#![allow(unused)]
|
||||||
|
#![allow(clippy::unit_arg)]
|
||||||
include!("../lib.rs");
|
include!("../lib.rs");
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
SamplerCli::parse().run()
|
SamplerCli::parse().run()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
|
#![allow(unused)]
|
||||||
#![allow(clippy::unit_arg)]
|
#![allow(clippy::unit_arg)]
|
||||||
|
|
||||||
include!("../lib.rs");
|
include!("../lib.rs");
|
||||||
|
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
SequencerCli::parse().run()
|
SequencerCli::parse().run()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
#![allow(unused)]
|
||||||
|
#![allow(clippy::unit_arg)]
|
||||||
include!("../lib.rs");
|
include!("../lib.rs");
|
||||||
|
|
||||||
/// Application entrypoint.
|
/// Application entrypoint.
|
||||||
pub fn main () -> Usually<()> {
|
pub fn main () -> Usually<()> {
|
||||||
Tui::run(JackClient::new("tek_transport")?.activate_with(|jack|{
|
Tui::run(JackClient::new("tek_transport")?.activate_with(|jack|{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
pub use ::jack as libjack;
|
pub use ::jack as libjack;
|
||||||
pub(crate) mod activate; pub(crate) use self::activate::*;
|
pub(crate) mod activate; #[allow(unused)] pub(crate) use self::activate::*;
|
||||||
pub(crate) mod audio; pub(crate) use self::audio::*;
|
pub(crate) mod audio; pub(crate) use self::audio::*;
|
||||||
pub(crate) mod client; pub(crate) use self::client::*;
|
pub(crate) mod client; pub(crate) use self::client::*;
|
||||||
pub(crate) mod jack_event; pub(crate) use self::jack_event::*;
|
pub(crate) mod jack_event; pub(crate) use self::jack_event::*;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ pub use ::atomic_float;
|
||||||
pub(crate) use atomic_float::*;
|
pub(crate) use atomic_float::*;
|
||||||
|
|
||||||
pub(crate) use std::sync::{Arc, Mutex, RwLock};
|
pub(crate) use std::sync::{Arc, Mutex, RwLock};
|
||||||
pub(crate) use std::sync::atomic::{Ordering, AtomicBool, AtomicUsize};
|
#[allow(unused)] pub(crate) use std::sync::atomic::Ordering;
|
||||||
|
pub(crate) use std::sync::atomic::{AtomicBool, AtomicUsize};
|
||||||
pub(crate) use std::collections::BTreeMap;
|
pub(crate) use std::collections::BTreeMap;
|
||||||
pub(crate) use std::marker::PhantomData;
|
pub(crate) use std::marker::PhantomData;
|
||||||
pub(crate) use std::thread::{spawn, JoinHandle};
|
pub(crate) use std::thread::{spawn, JoinHandle};
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ impl<E: Engine, T: Render<E>> Render<E> for Push<E, T> {
|
||||||
Self::X(x, _) => [area.x() + x, area.y(), size.w(), size.h()],
|
Self::X(x, _) => [area.x() + x, area.y(), size.w(), size.h()],
|
||||||
Self::Y(y, _) => [area.x(), area.y() + y, size.w(), size.h()],
|
Self::Y(y, _) => [area.x(), area.y() + y, size.w(), size.h()],
|
||||||
Self::XY(x, y, _) => [area.x() + x, area.y() + y, size.w(), size.h()],
|
Self::XY(x, y, _) => [area.x() + x, area.y() + y, size.w(), size.h()],
|
||||||
_ => unreachable!(),
|
|
||||||
}.into(), self.inner())).transpose()?.unwrap_or(()))
|
}.into(), self.inner())).transpose()?.unwrap_or(()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ impl<E: Engine, T: Render<E>> Shrink<E, T> {
|
||||||
Self::X(_, i) => i,
|
Self::X(_, i) => i,
|
||||||
Self::Y(_, i) => i,
|
Self::Y(_, i) => i,
|
||||||
Self::XY(_, _, i) => i,
|
Self::XY(_, _, i) => i,
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ mod arranger_scene; pub(crate) use self::arranger_scene::*;
|
||||||
mod arranger_select; pub(crate) use self::arranger_select::*;
|
mod arranger_select; pub(crate) use self::arranger_select::*;
|
||||||
mod arranger_track; pub(crate) use self::arranger_track::*;
|
mod arranger_track; pub(crate) use self::arranger_track::*;
|
||||||
mod arranger_mode; pub(crate) use self::arranger_mode::*;
|
mod arranger_mode; pub(crate) use self::arranger_mode::*;
|
||||||
mod arranger_v; pub(crate) use self::arranger_v::*;
|
mod arranger_v; #[allow(unused)] pub(crate) use self::arranger_v::*;
|
||||||
mod arranger_h;
|
mod arranger_h;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ impl<'a> ArrangerVClips<'a> {
|
||||||
scene: &'a ArrangerScene, index: usize, track: &'a ArrangerTrack, w: u16, h: u16
|
scene: &'a ArrangerScene, index: usize, track: &'a ArrangerTrack, w: u16, h: u16
|
||||||
) -> impl Render<Tui> + use<'a> {
|
) -> impl Render<Tui> + use<'a> {
|
||||||
Fixed::wh(w, h, Layers::new(move |add|{
|
Fixed::wh(w, h, Layers::new(move |add|{
|
||||||
let mut bg = TuiTheme::border_bg();
|
|
||||||
if let Some(Some(phrase)) = scene.clips.get(index) {
|
if let Some(Some(phrase)) = scene.clips.get(index) {
|
||||||
|
let mut bg = TuiTheme::border_bg();
|
||||||
let name = &(phrase as &Arc<RwLock<MidiClip>>).read().unwrap().name;
|
let name = &(phrase as &Arc<RwLock<MidiClip>>).read().unwrap().name;
|
||||||
let name = format!("{}", name);
|
let name = format!("{}", name);
|
||||||
let max_w = name.len().min((w as usize).saturating_sub(2));
|
let max_w = name.len().min((w as usize).saturating_sub(2));
|
||||||
|
|
@ -55,7 +55,6 @@ impl<'a> ArrangerVClips<'a> {
|
||||||
Tui::push_x(1, Fixed::w(w as u16, &name.as_str()[0..max_w])))
|
Tui::push_x(1, Fixed::w(w as u16, &name.as_str()[0..max_w])))
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
//add(&Background(bg))
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::*;
|
use crate::*;
|
||||||
use super::note_y_iter;
|
|
||||||
|
|
||||||
pub struct PianoHorizontalTimeline<'a>(pub(crate) &'a PianoHorizontal);
|
pub struct PianoHorizontalTimeline<'a>(pub(crate) &'a PianoHorizontal);
|
||||||
render!(<Tui>|self: PianoHorizontalTimeline<'a>|render(|to|{
|
render!(<Tui>|self: PianoHorizontalTimeline<'a>|render(|to|{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue