Skip to content

Commit

Permalink
can: Make ExtendedId::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 25, 2021
1 parent 6b3820e commit 31eabd5
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 @@ -61,7 +61,7 @@ impl ExtendedId {

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

Expand Down

0 comments on commit 31eabd5

Please sign in to comment.