diff --git a/src/types.rs b/src/types.rs index 774225c9df..743837598c 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1917,6 +1917,21 @@ impl JanetArgs for [Janet] { } } +impl JanetArgs for [Janet; N] { + #[inline] + fn get_value(&self, index: usize) -> Option { + self.get(index).copied() + } + + #[inline] + fn get_tagged(&self, index: usize) -> Option { + self.get(index).map(|j| j.unwrap()) + } +} + +// FIXME: Implement for `JanetTuple` and `JanetArray` once internally they start to use +// `usize` (`size_t`) + /// Trait defining the name of the type known to Janet pub trait JanetTypeName { /// Returns a string with the name of the type