Skip to content

Commit

Permalink
can: Make Id::new_unchecked() safe
Browse files Browse the repository at this point in the history
Invalid CAN identifiers are still memory safe.
  • Loading branch information
timokroeger committed Oct 20, 2021
1 parent 7558350 commit b2d00d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/can/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl StandardId {

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

Expand Down

0 comments on commit b2d00d1

Please sign in to comment.