tp_cmp optimization

This commit is contained in:
Jeong YunWon committed 2020-09-24 07:50:11 +09:00
1 parent 991b968294
commit c76126f951
6 files changed
+59 -51

No files matched your search

-7
View File
@@ -341,13 +341,6 @@ where
quote! {
slots.#slot_ident = Some(#into_func);
}
} else if slot_name == "cmp" {
let into_func = quote_spanned! {ident.span() =>
::std::boxed::Box::new(Self::#ident)
};
quote! {
slots.#slot_ident = Some(#into_func);
}
} else {
quote! {
slots.#slot_ident.store(Some(Self::#ident as _))