diff --git a/devices/src/legacy/rtc_pl031.rs b/devices/src/legacy/rtc_pl031.rs index 2c1e4d6bd..18ea32b27 100644 --- a/devices/src/legacy/rtc_pl031.rs +++ b/devices/src/legacy/rtc_pl031.rs @@ -70,9 +70,9 @@ pub enum ClockType { ThreadCpu, } -impl Into for ClockType { - fn into(self) -> libc::clockid_t { - match self { +impl From for libc::clockid_t { + fn from(ct: ClockType) -> libc::clockid_t { + match ct { ClockType::Monotonic => libc::CLOCK_MONOTONIC, ClockType::Real => libc::CLOCK_REALTIME, ClockType::ProcessCpu => libc::CLOCK_PROCESS_CPUTIME_ID,