From 3d24066eb6af1e41ae3fe7d7799f1c1ac0943fd6 Mon Sep 17 00:00:00 2001 From: Edsko de Vries Date: Thu, 23 Mar 2023 11:07:44 +0100 Subject: [PATCH] Export `withBorshBufferOfInitSize` --- src/Foreign/Rust/Marshall/Variable.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Foreign/Rust/Marshall/Variable.hs b/src/Foreign/Rust/Marshall/Variable.hs index a141e78..573e0fc 100644 --- a/src/Foreign/Rust/Marshall/Variable.hs +++ b/src/Foreign/Rust/Marshall/Variable.hs @@ -12,6 +12,7 @@ module Foreign.Rust.Marshall.Variable ( , getVarBuffer , withBorshVarBuffer , withBorshFailure + , withBorshBufferOfInitSize -- ** Pure variants , withPureBorshVarBuffer , withPureBorshFailure @@ -103,10 +104,10 @@ withPureBorshFailure :: forall a. withPureBorshFailure = unsafePerformIO . withBorshFailure {------------------------------------------------------------------------------- - Internal auxiliary + Generalization -------------------------------------------------------------------------------} --- | Generalization of 'withBorshVarBuffer' and 'withMaxBorshBuffer' +-- | Variation on 'withBorshVarBuffer' with user-specified initial buffer size withBorshBufferOfInitSize :: forall a. ( FromBorsh a , StaticBorshSize a ~ 'HasVariableSize