-
-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
I believe those should have ThreadPriorityValue
type, not u8
. It is always possible to convert it to u8
later if desired, but converting u8
to ThreadPriorityValue
requires unwrap()
or expect()
, which is inconvenient and unnecessary.
P.S. Clippy warning here has nothing to do with From<u8>
, it suggests you to do impl From<ThreadPriorityValue> for u8
:
Lines 264 to 271 in 74cf570
// The From<u8> is unsafe, so there is a TryFrom instead. | |
// For this reason we silent the warning from clippy. | |
#[allow(clippy::from_over_into)] | |
impl std::convert::Into<u8> for ThreadPriorityValue { | |
fn into(self) -> u8 { | |
self.0 | |
} | |
} |
Metadata
Metadata
Assignees
Labels
No labels