Skip to content

Commit b2d00d1

Browse files
committed
can: Make Id::new_unchecked() safe
Invalid CAN identifiers are still memory safe.
1 parent 7558350 commit b2d00d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/can/id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl StandardId {
2525

2626
/// Creates a new `StandardId` without checking if it is inside the valid range.
2727
#[inline]
28-
pub const unsafe fn new_unchecked(raw: u16) -> Self {
28+
pub const fn new_unchecked(raw: u16) -> Self {
2929
Self(raw)
3030
}
3131

0 commit comments

Comments
 (0)