fix: dict iterators bug

This commit is contained in:
Shunsuke Shibayama 2023-09-06 00:56:07 +09:00
parent da9b6befdc
commit 7729b73809
11 changed files with 160 additions and 52 deletions

View file

@ -1028,6 +1028,18 @@ impl<T: Locational, const N: usize> Locational for [T; N] {
}
}
impl<T: Locational> Locational for Vec<T> {
fn loc(&self) -> Location {
Location::stream(self)
}
}
impl<T: Locational> Locational for &T {
fn loc(&self) -> Location {
(*self).loc()
}
}
#[macro_export]
macro_rules! impl_locational_for_enum {
($Enum: ident; $($Variant: ident $(,)?)*) => {