Skip to content

Commit

Permalink
Remove an unnecessary unwrap
Browse files Browse the repository at this point in the history
`fmt::Write` for `String` is infallible. We can safely ignore the
`Result`.
  • Loading branch information
parasyte committed Jun 30, 2024
1 parent dd8c1c0 commit 7f1ba91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn derive_error(input: TokenStream) -> TokenStream {
v.display_fields
.iter()
.fold(String::new(), |mut fields, field| {
write!(fields, "{field},").unwrap();
let _ = write!(fields, "{field},");
fields
});

Expand Down

0 comments on commit 7f1ba91

Please sign in to comment.