Skip to content

Commit

Permalink
Fix new lint: literal_string_with_formatting_args
Browse files Browse the repository at this point in the history
  • Loading branch information
TTWNO committed Dec 30, 2024
1 parent d69efce commit 4c59c24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atspi-common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl std::fmt::Display for ObjectPathConversionError {
match self {
Self::NoIdAvailable => f.write_str("No ID available in the path."),
Self::ParseError(e) => {
f.write_str("Failure to parse: {e}")?;
f.write_str("Failure to parse: ")?;

Check warning on line 206 in atspi-common/src/error.rs

View check run for this annotation

Codecov / codecov/patch

atspi-common/src/error.rs#L206

Added line #L206 was not covered by tests
e.fmt(f)
}
}
Expand Down
4 changes: 3 additions & 1 deletion atspi-common/src/role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,9 @@ pub mod tests {
.unwrap_or_else(|_| panic!("Unable to encode {from_role}"));
println!("ENCODED: {encoded:?}");

let (zbus_role, _) = encoded.deserialize().expect("Unable to decode {encoded:?}");
let (zbus_role, _) = encoded
.deserialize()
.unwrap_or_else(|_| panic!("Unable to decode {encoded:?}"));

assert_eq!(from_role, zbus_role, "The serde `Data::deserialize` and `From<u32>` impls produced different results. The number used was {role_num}, it produced a Role of {from_role}, but the from_slice(...) implementation produced {zbus_role}");
assert_eq!(
Expand Down

0 comments on commit 4c59c24

Please sign in to comment.