Constify Config::new

This commit is contained in:
Rafael Bachmann 2023-10-15 22:11:30 +02:00
parent cd92bc3145
commit eeedaf2e76

View File

@ -99,7 +99,7 @@ pub struct Config<'a> {
impl<'a> Config<'a> { impl<'a> Config<'a> {
/// Create default configuration with the provided vid and pid values. /// Create default configuration with the provided vid and pid values.
pub fn new(vid: u16, pid: u16) -> Self { pub const fn new(vid: u16, pid: u16) -> Self {
Self { Self {
device_class: 0x00, device_class: 0x00,
device_sub_class: 0x00, device_sub_class: 0x00,