Use associated type for Iterator trait
Fullstop000 opened this issue · 0 comments
Fullstop000 commented
Current Iterator
trait just returns Slice
in key()
and value()
Lines 59 to 65 in 6029534
This can limit the usage of Iterator
s. We might want a non-slice key or value.
Consider using an advanced trait with associated type instead:
pub trait Iterator {
type Key;
type Value;
fn key(&self) -> Self::Key;
fn value(&self) -> Self::Value;
}
Block #49