From eeedaf2e763c79a5758460936ba32f23ceb7956c Mon Sep 17 00:00:00 2001 From: Rafael Bachmann Date: Sun, 15 Oct 2023 22:11:30 +0200 Subject: [PATCH] Constify Config::new --- embassy-usb/src/builder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index 6b68bcd7b..8860f9eea 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs @@ -99,7 +99,7 @@ pub struct Config<'a> { impl<'a> Config<'a> { /// 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 { device_class: 0x00, device_sub_class: 0x00,