move Debug impls next to structs

This commit is contained in:
🪞👃🪞 2024-11-27 00:53:01 +01:00
parent 71e19c9800
commit 763063f4ed
5 changed files with 47 additions and 50 deletions

View file

@ -9,6 +9,16 @@ pub struct TransportTui {
pub focus: FocusState<TransportFocus>,
}
impl std::fmt::Debug for TransportTui {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
f.debug_struct("TransportTui")
.field("jack", &self.jack)
.field("size", &self.size)
.field("cursor", &self.cursor)
.finish()
}
}
/// Create app state from JACK handle.
impl TryFrom<&Arc<RwLock<JackClient>>> for TransportTui {
type Error = Box<dyn std::error::Error>;