summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-06-16 14:26:52 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-03-25 10:50:14 +0100
commiteafd3fece3e6828bfba81f2c873a9d08fb2cb8b2 (patch)
tree3921d70a71dcc07b253e1a30c2db93882ca7712b
parent201897fbfe3521d6e17465e25d991c84a5d9449d (diff)
Impl Deref for BlockExt
-rw-r--r--src/typeext/block.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/typeext/block.rs b/src/typeext/block.rs
index d6931c3..382578d 100644
--- a/src/typeext/block.rs
+++ b/src/typeext/block.rs
@@ -1,3 +1,5 @@
+use std::ops::Deref;
+
use failure::Error;
use futures::Future;
use futures::stream;
@@ -20,6 +22,14 @@ impl Into<Block> for BlockExt {
}
}
+impl Deref for BlockExt {
+ type Target = Block;
+
+ fn deref(&self) -> &Self::Target {
+ &self.block
+ }
+}
+
impl BlockExt {
pub fn from_block(block: Block, repo: Repository) -> Self {
BlockExt { block, repo }