fix final clippy lint

This commit is contained in:
Nicole Tietz-Sokolskaya 2025-01-10 19:13:15 -05:00
parent 6bc347851d
commit 914db6dbe0

View file

@ -1,3 +1,19 @@
//! Architecture for the MIDI connectivity:
//!
//! State is what's held by the daemon, and is used in an event loop.
//! - queues are passed in which are what we use to route messages
//! - this state can only be accessed directly by the event loop, as it owns the state
//! - does a `select!` (crossbeam) on the timer tick and on other channels
//! - each tick of the timer (on a timer rx channel), call `state.refresh_ports()` and assign
//! ports if they're mapped automatically (drums / windsynth / ignore) for anything that
//! isn't yet mapped (users can override in UI)
//! - listens to a queue of routing updates ("set connectionid to drums / windsynth / ignore")
//! from the UI
//! - receive from the message_receive queue and route the messages
//!
//! ideal would be to do the port refresh on a separate thread. but! it's relatively cheap (250
//! microseconds per refresh) so it's not a big deal
use std::{collections::HashMap, thread::JoinHandle, time::Duration}; use std::{collections::HashMap, thread::JoinHandle, time::Duration};
use crossbeam::{ use crossbeam::{
@ -19,21 +35,6 @@ pub enum Category {
Ignore, Ignore,
} }
/// Architecture for the MIDI connectivity:
///
/// State is what's held by the daemon, and is used in an event loop.
/// - queues are passed in which are what we use to route messages
/// - this state can only be accessed directly by the event loop, as it owns the state
/// - does a `select!` (crossbeam) on the timer tick and on other channels
/// - each tick of the timer (on a timer rx channel), call `state.refresh_ports()` and assign
/// ports if they're mapped automatically (drums / windsynth / ignore) for anything that
/// isn't yet mapped (users can override in UI)
/// - listens to a queue of routing updates ("set connectionid to drums / windsynth / ignore")
/// from the UI
/// - receive from the message_receive queue and route the messages
///
/// ideal would be to do the port refresh on a separate thread. but! it's relatively cheap (250
/// microseconds per refresh) so it's not a big deal
pub type ConnectionId = String; pub type ConnectionId = String;
pub type Timestamp = u64; pub type Timestamp = u64;