diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50a421e..5ee9208 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,7 +45,7 @@ repos: - id: codespell args: [--ignore-words=.codespellignore] - repo: https://github.com/sirosen/check-jsonschema - rev: 0.24.1 + rev: 0.25.0 hooks: - id: check-github-actions - id: check-github-workflows diff --git a/Cargo.toml b/Cargo.toml index 822a6a0..feb68c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ readme = "README.md" repository = "https://github.com/uklotzde/djio" keywords = ["dj", "controller", "midi", "hid"] categories = ["hardware-support"] +rust-version = "1.72" edition = "2021" include = ["/src", "/README.md", "/LICENSES"] diff --git a/src/devices/ni_traktor_kontrol_s4mk3/mod.rs b/src/devices/ni_traktor_kontrol_s4mk3/mod.rs index c897a73..468aa1e 100644 --- a/src/devices/ni_traktor_kontrol_s4mk3/mod.rs +++ b/src/devices/ni_traktor_kontrol_s4mk3/mod.rs @@ -213,6 +213,7 @@ impl DeviceContext { }) } + #[allow(clippy::missing_panics_doc)] // Never panics pub fn detach(self) -> HidResult { log::info!("Terminating I/O thread"); self.command_tx diff --git a/src/midi/midir.rs b/src/midi/midir.rs index 84e5639..1584fe2 100644 --- a/src/midi/midir.rs +++ b/src/midi/midir.rs @@ -254,6 +254,7 @@ where } #[must_use] + #[allow(clippy::missing_panics_doc)] // Never panics pub fn detect_dj_controllers( &self, device_descriptors: &[&MidiDeviceDescriptor], diff --git a/src/param/atomic.rs b/src/param/atomic.rs index 33528a1..5014309 100644 --- a/src/param/atomic.rs +++ b/src/param/atomic.rs @@ -148,6 +148,9 @@ impl AtomicValue { } } + /// # Panics + /// + /// Panics if the value type does not match. pub fn store_bool(&self, value: bool) { debug_assert_eq!(self.value_type(), ValueType::Bool); self.as_bool() @@ -155,6 +158,9 @@ impl AtomicValue { .store(value, ATOMIC_STORE_ORDERING); } + /// # Panics + /// + /// Panics if the value type does not match. pub fn store_i32(&self, value: i32) { debug_assert_eq!(self.value_type(), ValueType::I32); self.as_i32() @@ -162,6 +168,9 @@ impl AtomicValue { .store(value, ATOMIC_STORE_ORDERING); } + /// # Panics + /// + /// Panics if the value type does not match. pub fn store_u32(&self, value: u32) { debug_assert_eq!(self.value_type(), ValueType::U32); self.as_u32() @@ -169,6 +178,9 @@ impl AtomicValue { .store(value, ATOMIC_STORE_ORDERING); } + /// # Panics + /// + /// Panics if the value type does not match. pub fn store_f32(&self, value: f32) { debug_assert_eq!(self.value_type(), ValueType::F32); self.as_f32() @@ -176,6 +188,9 @@ impl AtomicValue { .store(value, ATOMIC_STORE_ORDERING); } + /// # Panics + /// + /// Panics if the value type does not match. pub fn swap_bool(&self, value: bool) -> bool { debug_assert_eq!(self.value_type(), ValueType::Bool); self.as_bool() @@ -183,6 +198,9 @@ impl AtomicValue { .swap(value, ATOMIC_STORE_ORDERING) } + /// # Panics + /// + /// Panics if the value type does not match. pub fn swap_i32(&self, value: i32) -> i32 { debug_assert_eq!(self.value_type(), ValueType::I32); self.as_i32() @@ -190,6 +208,9 @@ impl AtomicValue { .swap(value, ATOMIC_STORE_ORDERING) } + /// # Panics + /// + /// Panics if the value type does not match. pub fn swap_u32(&self, value: u32) -> u32 { debug_assert_eq!(self.value_type(), ValueType::U32); self.as_u32() @@ -197,6 +218,9 @@ impl AtomicValue { .swap(value, ATOMIC_STORE_ORDERING) } + /// # Panics + /// + /// Panics if the value type does not match. pub fn swap_f32(&self, value: f32) -> f32 { debug_assert_eq!(self.value_type(), ValueType::F32); self.as_f32()