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