mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
tp_cmp optimization
This commit is contained in:
1 parent
991b968294
commit
c76126f951
6 files changed
+59
-51
No files matched your search
@@ -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 _))
|
||||
|
||||
Reference in new issue
Block a user