fix warnings

This commit is contained in:
🪞👃🪞 2025-05-10 21:44:36 +03:00
parent 2ef9628ab8
commit e5752ea4b0
13 changed files with 16 additions and 22 deletions

View file

@ -29,7 +29,7 @@ pub struct Clock {
} }
impl std::fmt::Debug for Clock { impl std::fmt::Debug for Clock {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { fn fmt (&self, f: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
f.debug_struct("Clock") f.debug_struct("Clock")
.field("timebase", &self.timebase) .field("timebase", &self.timebase)
.field("chunk", &self.chunk) .field("chunk", &self.chunk)

View file

@ -1,7 +1,5 @@
use crate::*;
mod editor_api; pub use self::editor_api::*; mod editor_api; pub use self::editor_api::*;
mod editor_model; pub use self::editor_model::*; mod editor_model; pub use self::editor_model::*;
mod editor_view; pub use self::editor_view::*; mod editor_view; //pub use self::editor_view::*;
mod editor_view_h; pub use self::editor_view_h::*; mod editor_view_h; pub use self::editor_view_h::*;
mod editor_view_v; pub use self::editor_view_v::*; mod editor_view_v; pub use self::editor_view_v::*;

View file

@ -82,7 +82,7 @@ use crate::*;
editor.put_note(false); editor.put_note(false);
Ok(None) Ok(None)
} }
fn note_del (editor: &mut MidiEditor) -> Perhaps<Self> { fn note_del (_editor: &mut MidiEditor) -> Perhaps<Self> {
todo!() todo!()
} }
fn note_pos (editor: &mut MidiEditor, pos: usize) -> Perhaps<Self> { fn note_pos (editor: &mut MidiEditor, pos: usize) -> Perhaps<Self> {

View file

@ -9,7 +9,7 @@ pub struct MidiEditor {
} }
impl std::fmt::Debug for MidiEditor { impl std::fmt::Debug for MidiEditor {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { fn fmt (&self, f: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
f.debug_struct("MidiEditor") f.debug_struct("MidiEditor")
.field("mode", &self.mode) .field("mode", &self.mode)
.finish() .finish()

View file

@ -286,7 +286,7 @@ impl MidiViewer for PianoHorizontal {
} }
impl std::fmt::Debug for PianoHorizontal { impl std::fmt::Debug for PianoHorizontal {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { fn fmt (&self, f: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
let buffer = self.buffer.read().unwrap(); let buffer = self.buffer.read().unwrap();
f.debug_struct("PianoHorizontal") f.debug_struct("PianoHorizontal")
.field("time_zoom", &self.range.time_zoom) .field("time_zoom", &self.range.time_zoom)

View file

@ -32,6 +32,9 @@ pub use self::device::*;
#[cfg(feature = "sampler")] mod sampler; #[cfg(feature = "sampler")] mod sampler;
#[cfg(feature = "sampler")] pub use self::sampler::*; #[cfg(feature = "sampler")] pub use self::sampler::*;
#[cfg(feature = "meter")] mod meter;
#[cfg(feature = "meter")] pub use self::meter::*;
#[cfg(feature = "lv2")] mod lv2; #[cfg(feature = "lv2")] mod lv2;
#[cfg(feature = "lv2")] pub use self::lv2::*; #[cfg(feature = "lv2")] pub use self::lv2::*;

View file

@ -1,5 +1,5 @@
mod lv2_model; pub use self::lv2_model::*; mod lv2_model; pub use self::lv2_model::*;
mod lv2_audio; pub use self::lv2_audio::*; mod lv2_audio; //pub use self::lv2_audio::*;
mod lv2_gui; pub use self::lv2_gui::*; mod lv2_gui; pub use self::lv2_gui::*;
mod lv2_tui; pub use self::lv2_tui::*; mod lv2_tui; //pub use self::lv2_tui::*;
pub(self) use std::thread::JoinHandle; //pub(self) use std::thread::JoinHandle;

View file

@ -1,5 +1,4 @@
use crate::*; use crate::*;
use super::*;
/// A LV2 plugin. /// A LV2 plugin.
#[derive(Debug)] #[derive(Debug)]

View file

@ -1,5 +1,3 @@
use crate::*;
pub(crate) use symphonia::{ pub(crate) use symphonia::{
core::{ core::{
formats::Packet, formats::Packet,

View file

@ -1,8 +1,5 @@
use crate::*; use crate::*;
macro_rules! cmd { ($cmd:expr) => {{ $cmd; None }}; }
macro_rules! cmd_todo { ($msg:literal) => {{ println!($msg); None }}; }
#[tengri_proc::expose] #[tengri_proc::expose]
impl Sampler { impl Sampler {
//fn file_browser_filter (&self) -> Arc<str> { //fn file_browser_filter (&self) -> Arc<str> {

View file

@ -62,7 +62,7 @@ impl Sampler {
Fixed::x(12, Map::south( Fixed::x(12, Map::south(
1, 1,
move||(note_lo..=note_hi).rev(), move||(note_lo..=note_hi).rev(),
move|note, i| { move|note, _index| {
//let offset = |a|Push::y(i as u16, Align::n(Fixed::y(1, Fill::x(a)))); //let offset = |a|Push::y(i as u16, Align::n(Fixed::y(1, Fill::x(a))));
let mut bg = if note == note_pt { Tui::g(64) } else { Color::Reset }; let mut bg = if note == note_pt { Tui::g(64) } else { Color::Reset };
let mut fg = Tui::g(160); let mut fg = Tui::g(160);

View file

@ -1,11 +1,10 @@
use crate::*;
mod seq_clip; pub use self::seq_clip::*; mod seq_clip; pub use self::seq_clip::*;
mod seq_launch; pub use self::seq_launch::*; mod seq_launch; pub use self::seq_launch::*;
mod seq_model; pub use self::seq_model::*; mod seq_model; pub use self::seq_model::*;
mod seq_view; pub use self::seq_view::*; mod seq_view; pub use self::seq_view::*;
#[cfg(test)] #[test] pub fn test_midi_clip () { #[cfg(test)] #[test] pub fn test_midi_clip () {
use crate::*;
let clip = MidiClip::stop_all(); let clip = MidiClip::stop_all();
println!("{clip:?}"); println!("{clip:?}");
@ -22,6 +21,7 @@ mod seq_view; pub use self::seq_view::*;
} }
#[cfg(test)] #[test] fn test_midi_play () { #[cfg(test)] #[test] fn test_midi_play () {
use crate::*;
let sequencer = Sequencer::default(); let sequencer = Sequencer::default();
println!("{sequencer:?}"); println!("{sequencer:?}");
} }

View file

@ -1,6 +1,5 @@
//! MIDI sequencer //! MIDI sequencer
use crate::*; use crate::*;
use tek_engine::jack::*;
pub trait HasSequencer { pub trait HasSequencer {
fn sequencer (&self) -> &impl MidiPlayerApi; fn sequencer (&self) -> &impl MidiPlayerApi;
@ -98,7 +97,7 @@ impl Sequencer {
} }
impl std::fmt::Debug for Sequencer { impl std::fmt::Debug for Sequencer {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> { fn fmt (&self, f: &mut Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
f.debug_struct("Sequencer") f.debug_struct("Sequencer")
.field("clock", &self.clock) .field("clock", &self.clock)
.field("play_clip", &self.play_clip) .field("play_clip", &self.play_clip)