From 49db8a1187bd05535f13a5d13effb9f0bb8ac394 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 29 Apr 2019 13:03:36 +0200 Subject: [PATCH] core: implement Default for NABufferRef --- nihav-core/src/refs.rs | 5 +++++ 1 file changed, 5 insertions(+) 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 Drop for NABufferRef { } } +impl Default for NABufferRef { + fn default() -> Self { + Self::new(T::default()) + } +} -- 2.30.2