From e6f2a381e5a14e5dcda2eb7cfd98b11050fefc3a Mon Sep 17 00:00:00 2001 From: bendn Date: Thu, 26 Oct 2023 20:04:12 +0700 Subject: [PATCH] more buffers --- Cargo.toml | 2 +- src/builder.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dedc601..d580d7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fimg" -version = "0.4.16" +version = "0.4.17" authors = ["bend-n "] license = "MIT" edition = "2021" diff --git a/src/builder.rs b/src/builder.rs index 9133e36..bff5e7c 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -98,4 +98,14 @@ mod buf { N } } + impl Buffer for Box<[T; N]> { + fn len(&self) -> usize { + N + } + } + impl Buffer for Box<[T]> { + fn len(&self) -> usize { + <[T]>::len(self) + } + } }