fast image operations
more buffers
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/builder.rs | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -1,6 +1,6 @@ [package] name = "fimg" -version = "0.4.16" +version = "0.4.17" authors = ["bend-n <[email protected]>"] 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<T, const N: usize> Buffer for Box<[T; N]> { + fn len(&self) -> usize { + N + } + } + impl<T> Buffer for Box<[T]> { + fn len(&self) -> usize { + <[T]>::len(self) + } + } } |