]> git.nihav.org Git - nihav.git/commitdiff
core: implement Default for NABufferRef
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 29 Apr 2019 11:03:36 +0000 (13:03 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 29 Apr 2019 11:03:36 +0000 (13:03 +0200)
nihav-core/src/refs.rs

index f2b0577866174e1d5910f6062e1b4e9ef23aceaa..b83aa25428b7c75df67182efa73536a646fb7d7d 100644 (file)
@@ -85,3 +85,8 @@ impl<T> Drop for NABufferRef<T> {
     }
 }
 
+impl<T:Default> Default for NABufferRef<T> {
+    fn default() -> Self {
+        Self::new(T::default())
+    }
+}