Skip to content

Commit

Permalink
Remove a useless question mark operator.
Browse files Browse the repository at this point in the history
Make clippy happy.
  • Loading branch information
TheVeryDarkness committed Aug 30, 2024
1 parent 6e84d94 commit d21d6a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/write_into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait WriteInto {
let mut s = Vec::new();
self.try_write_into(&mut s)?;
// What if the string is not valid UTF-8?
Ok(String::from_utf8(s).map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?)
String::from_utf8(s).map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))
}
/// Unwrapping version of [WriteInto::try_write_into_string].
fn write_into_string(&self) -> String {
Expand Down

0 comments on commit d21d6a6

Please sign in to comment.