Use assert! in const

This commit is contained in:
Sosthène Guédon
2023-01-31 10:27:49 +01:00
committed by Robin Krahl
parent 7e6cc15da7
commit 1a2b703245
+1 -2
View File
@@ -12,8 +12,7 @@ use crate::{
use usb_device::class_prelude::*;
// Const assertion
const _: [(); 0 - !{ MAX_MSG_LENGTH >= PACKET_SIZE } as usize] = [];
const _: () = assert!(MAX_MSG_LENGTH >= PACKET_SIZE);
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum State {