Fix clippy
All checks were successful
Continuous Integration / Check (push) Successful in 50s
Continuous Integration / Clippy (push) Successful in 48s

This commit is contained in:
August 2026-10-08 15:43:06 -04:00
parent d116020b3d
commit 13e9e768c6
Signed by: shibedrill
SSH Key Fingerprint: SHA256:M0m3JW1s38BgO2t0fG146Yxd9OJ2IOqkvCAsuRHQ6Pw
2 changed files with 16 additions and 0 deletions

View File

@ -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!(

View File

@ -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 {