i2c: run clippy --fix

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
This commit is contained in:
Manos Pitsidianakis 2025-07-08 11:23:50 +03:00 committed by Stefano Garzarella
parent d88b12b9e0
commit c0051585e4
3 changed files with 5 additions and 5 deletions

View File

@ -382,7 +382,7 @@ impl I2cDevice for PhysDevice {
AdapterIdentifier::Name(adapter_name) => PhysDevice::find_adapter(adapter_name)?,
AdapterIdentifier::Number(no) => *no,
};
let device_path = format!("/dev/i2c-{}", adapter_no);
let device_path = format!("/dev/i2c-{adapter_no}");
Self::open_with(&device_path, adapter_no)
}

View File

@ -82,8 +82,8 @@ enum AdapterIdentifier {
impl fmt::Display for AdapterIdentifier {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
AdapterIdentifier::Name(name) => write!(f, "adapter_name: {}", name),
AdapterIdentifier::Number(no) => write!(f, "adapter_no:: {}", no),
AdapterIdentifier::Name(name) => write!(f, "adapter_name: {name}"),
AdapterIdentifier::Number(no) => write!(f, "adapter_no:: {no}"),
}
}
}

View File

@ -69,7 +69,7 @@ pub(crate) enum Error {
impl convert::From<Error> for io::Error {
fn from(e: Error) -> Self {
io::Error::new(io::ErrorKind::Other, e)
io::Error::other(e)
}
}
@ -348,7 +348,7 @@ impl<D: 'static + I2cDevice + Sync + Send> VhostUserBackendMut for VhostUserI2cB
}
_ => {
warn!("unhandled device_event: {}", device_event);
warn!("unhandled device_event: {device_event}");
return Err(Error::HandleEventUnknown.into());
}
}