identifiers: Make device_id! return a reference
Not necessarily 'static like the other macros but otherwise consistent.
This commit is contained in:
parent
8923881678
commit
c3382f085c
@ -92,11 +92,11 @@ where
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shorthand for `Box::<DeviceId>::from`.
|
/// Shorthand for `<&DeviceId>::from`.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! device_id {
|
macro_rules! device_id {
|
||||||
($s:tt) => {
|
($s:expr) => {
|
||||||
::std::boxed::Box::<$crate::DeviceId>::from($s)
|
<&$crate::DeviceId as ::std::convert::From<_>>::from($s)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user