Skip to content

Commit 800eefd

Browse files
bors[bot]dimpolo
andauthored
Merge #457
457: embedded-can: make `StandardId::as_raw` and `ExtendedId::as_raw` const r=ryankurte a=dimpolo Co-authored-by: dimpolo <[email protected]>
2 parents 1439504 + 215d7b4 commit 800eefd

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)