macros: Implement AsRef<{id}> for {id}
This commit is contained in:
parent
24ce9d5e09
commit
4ac0ae1392
@ -128,6 +128,13 @@ pub fn expand_id_zst(input: ItemStruct) -> syn::Result<TokenStream> {
|
||||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl #impl_generics AsRef<#id_ty> for #id_ty {
|
||||
fn as_ref(&self) -> &#id_ty {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl #impl_generics AsRef<str> for #id_ty {
|
||||
fn as_ref(&self) -> &str {
|
||||
|
Loading…
x
Reference in New Issue
Block a user