diff --git a/src/lib.rs b/src/lib.rs index 058e701..d49d746 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -209,13 +209,11 @@ impl std::fmt::Display for Error { Self::LaunchArgumentsNotSupported => { write!(f, "kernel drivers do not support launch arguments") } - Self::ParseValue(name, _) => write!(f, "invalid {} value", name), - Self::ArgumentHasNulByte(name) => write!(f, "{} contains a nul byte", name), - Self::ArgumentArrayElementHasNulByte(name, index) => write!( - f, - "{} contains a nul byte in element at {} index", - name, index - ), + Self::ParseValue(name, _) => write!(f, "invalid {name} value"), + Self::ArgumentHasNulByte(name) => write!(f, "{name} contains a nul byte"), + Self::ArgumentArrayElementHasNulByte(name, index) => { + write!(f, "{name} contains a nul byte in element at {index} index",) + } Self::Winapi(_) => write!(f, "IO error in winapi call"), } } diff --git a/src/service.rs b/src/service.rs index 3fe426d..a7c7e2a 100644 --- a/src/service.rs +++ b/src/service.rs @@ -1943,13 +1943,13 @@ impl std::fmt::Display for ParseRawError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::InvalidInteger(u) => { - write!(f, "invalid unsigned integer for the target type: {}", u) + write!(f, "invalid unsigned integer for the target type: {u}") } Self::InvalidIntegerSigned(i) => { - write!(f, "invalid signed integer for the target type: {}", i) + write!(f, "invalid signed integer for the target type: {i}") } Self::InvalidGuid(guid) => { - write!(f, "invalid GUID value for the target type: {}", guid) + write!(f, "invalid GUID value for the target type: {guid}") } } }