From 38e452d2b732f5bb5604bd316b15f7c936d0a757 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 5 Apr 2024 22:32:43 +0300 Subject: [PATCH] ManagedBufferBuilder fix --- framework/base/src/formatter/formatter_traits.rs | 2 +- .../types/managed/wrapped/builder/managed_buffer_builder.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/base/src/formatter/formatter_traits.rs b/framework/base/src/formatter/formatter_traits.rs index 015641e3b6..7faa0b00f5 100644 --- a/framework/base/src/formatter/formatter_traits.rs +++ b/framework/base/src/formatter/formatter_traits.rs @@ -19,7 +19,7 @@ pub trait FormatByteReceiver { fn append_managed_buffer_binary(&mut self, item: &ManagedBuffer); } -pub trait FormatBuffer { +pub trait FormatBuffer: Default { fn append_ascii(&mut self, ascii: &[u8]); fn append_display(&mut self, item: &T); diff --git a/framework/base/src/types/managed/wrapped/builder/managed_buffer_builder.rs b/framework/base/src/types/managed/wrapped/builder/managed_buffer_builder.rs index ac3b733ac7..b65aa8e0e0 100644 --- a/framework/base/src/types/managed/wrapped/builder/managed_buffer_builder.rs +++ b/framework/base/src/types/managed/wrapped/builder/managed_buffer_builder.rs @@ -155,10 +155,9 @@ where } } -impl FormatBuffer for ManagedBufferBuilder +impl FormatBuffer for ManagedBufferBuilder> where M: ManagedTypeApi, - Impl: ManagedBufferBuilderImpl, { fn append_ascii(&mut self, ascii: &[u8]) { self.append_bytes(ascii)