Add a convert_payload function to Signed (#2320)

* Add a `convert_payload` function to `Signed`

* Review feedback
This commit is contained in:
Bastian Köcher authored and GitHub committed 2021-01-25 20:50:45 +00:00
1 parent b210850d5c
commit fa6e4b4488
2 files changed
+16

No files matched your search

+6
View File
@@ -85,6 +85,12 @@ impl Statement {
}
}
impl From<&'_ Statement> for CompactStatement {
fn from(stmt: &Statement) -> Self {
stmt.to_compact()
}
}
impl EncodeAs<CompactStatement> for Statement {
fn encode_as(&self) -> Vec<u8> {
self.to_compact().encode()