Remove debug_assert in PublicKey::write_into

This commit is contained in:
Steven Roose 2020-10-23 21:28:46 +01:00
parent 545965d9e3
commit 90e1125eff
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 1 additions and 2 deletions

View File

@ -102,12 +102,11 @@ impl PublicKey {
/// Write the public key into a writer /// Write the public key into a writer
pub fn write_into<W: io::Write>(&self, mut writer: W) { pub fn write_into<W: io::Write>(&self, mut writer: W) {
let write_res: io::Result<()> = if self.compressed { let _: io::Result<()> = if self.compressed {
writer.write_all(&self.key.serialize()) writer.write_all(&self.key.serialize())
} else { } else {
writer.write_all(&self.key.serialize_uncompressed()) writer.write_all(&self.key.serialize_uncompressed())
}; };
debug_assert!(write_res.is_ok());
} }
/// Serialize the public key to bytes /// Serialize the public key to bytes