Skip to content

Commit

Permalink
Implemented From<H256> for TransactionId (#273)
Browse files Browse the repository at this point in the history
* Implemented From<H256> for TransactionId

Signed-off-by: Matthieu Le brazidec <matthieu@lebrazidec.email>

* Fixed formatting

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
  • Loading branch information
r3v2d0g and tomusdrw committed Oct 16, 2019
1 parent 1ad0afa commit ff1a273
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/types/transaction_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ pub enum TransactionId {
/// By block and index
Block(BlockId, Index),
}

impl From<H256> for TransactionId {
fn from(hash: H256) -> Self {
TransactionId::Hash(hash)
}
}

0 comments on commit ff1a273

Please sign in to comment.