Skip to content

Commit 215d7b4

Browse files
authored
embedded-can: make StandardId::as_raw and ExtendedId::as_raw const
1 parent 3a7c3ca commit 215d7b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

embedded-can/src/id.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl StandardId {
3434

3535
/// Returns this CAN Identifier as a raw 16-bit integer.
3636
#[inline]
37-
pub fn as_raw(&self) -> u16 {
37+
pub const fn as_raw(&self) -> u16 {
3838
self.0
3939
}
4040
}
@@ -73,7 +73,7 @@ impl ExtendedId {
7373

7474
/// Returns this CAN Identifier as a raw 32-bit integer.
7575
#[inline]
76-
pub fn as_raw(&self) -> u32 {
76+
pub const fn as_raw(&self) -> u32 {
7777
self.0
7878
}
7979

0 commit comments

Comments
 (0)