[core] Implement as_index() for range_bound_struct

This commit is contained in:
Eryn Wells 2024-01-28 15:50:31 -08:00
parent dab787170c
commit 21c81f237a

View file

@ -90,6 +90,10 @@ macro_rules! range_bound_struct {
$vis unsafe fn new_unchecked(x: $repr) -> Self {
Self(x)
}
$vis fn as_index(&self) -> &$repr {
&self.0
}
}
impl Into<$repr> for $type {