Skip to content

Commit

Permalink
Merge #489: replaced if else return with mapping
Browse files Browse the repository at this point in the history
480c3fd replaced if else return with mapping (BufferOverflow)

Pull request description:

  Fixes #479

ACKs for top commit:
  apoelstra:
    ACK 480c3fd

Tree-SHA512: 6b7384217ea1dbc621b26ca86fb2d6f9aa44f190b0b3abd20b5b4c8d1c659a274d3aab86223d58594d8a68ef34764f444d48c79f16e010c021351187c1b6b32e
  • Loading branch information
apoelstra committed Nov 6, 2022
2 parents fd9ef55 + 480c3fd commit 61210a0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/descriptor/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ impl<'f, 'a> Formatter<'f, 'a> {
impl<'f, 'a> fmt::Write for Formatter<'f, 'a> {
fn write_str(&mut self, s: &str) -> fmt::Result {
self.fmt.write_str(s)?;
if self.eng.input(s).is_ok() {
Ok(())
} else {
Err(fmt::Error)
}
self.eng.input(s).map_err(|_| fmt::Error)
}
}

Expand Down

0 comments on commit 61210a0

Please sign in to comment.