add ref_at util macro
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
3b30bd3580
commit
61d9ac66fa
1 changed files with 7 additions and 0 deletions
|
@ -79,6 +79,13 @@ macro_rules! at {
|
|||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! ref_at {
|
||||
($idx:tt) => {
|
||||
|ref t| &t.$idx
|
||||
};
|
||||
}
|
||||
|
||||
/// Functor for equality i.e. .is_some_and(is_equal!(2))
|
||||
#[macro_export]
|
||||
macro_rules! is_equal_to {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue