Fix clippy
This commit is contained in:
parent
d116020b3d
commit
13e9e768c6
@ -3,6 +3,8 @@
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use core::str::FromStr;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use raw_cpuid::CpuId;
|
||||
use raw_cpuid::CpuIdReaderNative;
|
||||
@ -86,6 +88,13 @@ impl TryFrom<&str> for ProcessorVendor {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for ProcessorVendor {
|
||||
type Err = ();
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
ProcessorVendor::try_from(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl ProcessorVendor {
|
||||
pub fn is_hypervisor(&self) -> bool {
|
||||
matches!(
|
||||
|
||||
@ -130,6 +130,13 @@ impl TryFrom<&str> for LogLevel {
|
||||
}
|
||||
}
|
||||
|
||||
impl core::str::FromStr for LogLevel {
|
||||
type Err = EnumParseError;
|
||||
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
||||
LogLevel::try_from(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<LogLevel> for String {
|
||||
fn from(from: LogLevel) -> String {
|
||||
match from {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user