aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-core/src
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2019-04-29 13:03:36 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2019-04-29 13:03:36 +0200
commit49db8a1187bd05535f13a5d13effb9f0bb8ac394 (patch)
tree56bfecab0948114e73e1a8ca4a8763b527d2f9db /nihav-core/src
parent2422d9699cd56cbb86ac32b3e8dd026e20a89db5 (diff)
downloadnihav-49db8a1187bd05535f13a5d13effb9f0bb8ac394.tar.gz
core: implement Default for NABufferRef
Diffstat (limited to 'nihav-core/src')
-rw-r--r--nihav-core/src/refs.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/nihav-core/src/refs.rs b/nihav-core/src/refs.rs
index f2b0577..b83aa25 100644
--- a/nihav-core/src/refs.rs
+++ b/nihav-core/src/refs.rs
@@ -85,3 +85,8 @@ impl<T> Drop for NABufferRef<T> {
}
}
+impl<T:Default> Default for NABufferRef<T> {
+ fn default() -> Self {
+ Self::new(T::default())
+ }
+}