[core] Implement as_index() for range_bound_struct
This commit is contained in:
parent
dab787170c
commit
21c81f237a
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue