From b867510a4408042ec38b700c5bf8e7cffa87dc40 Mon Sep 17 00:00:00 2001 From: dantaras <47561995+dantaras@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:48:10 +0200 Subject: [PATCH] Add missing DenseVector method (#33) --- Project.toml | 2 +- src/write_buffer.jl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 935682c..32f462b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LightBSON" uuid = "a4a7f996-b3a6-4de6-b9db-2fa5f350df41" authors = ["Christian Rorvik "] -version = "0.2.19" +version = "0.2.20" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" diff --git a/src/write_buffer.jl b/src/write_buffer.jl index 8657092..852be10 100644 --- a/src/write_buffer.jl +++ b/src/write_buffer.jl @@ -21,6 +21,8 @@ end @inline Base.sizeof(buffer::BSONWriteBuffer) = buffer.len +@inline Base.elsize(BSONWriteBuffer) = 1 + @inline function Base.getindex(buffer::BSONWriteBuffer, i::Integer) @boundscheck (i > 0 && i <= buffer.len) || throw(BoundsError(buffer, i)) @inbounds buffer.data[i] @@ -43,4 +45,4 @@ end buffer.len += 1 @inbounds buffer.data[buffer.len] = x buffer -end \ No newline at end of file +end