()
| 222 | |
| 223 | #[test] |
| 224 | fn test_into_native_fn_noalloc() { |
| 225 | fn py_func(_b: bool, _vm: &crate::VirtualMachine) -> i32 { |
| 226 | 1 |
| 227 | } |
| 228 | assert_eq!(size_of_val(&py_func.into_func()), 0); |
| 229 | let empty_closure = || "foo".to_owned(); |
| 230 | assert_eq!(size_of_val(&empty_closure.into_func()), 0); |
| 231 | assert_eq!(size_of_val(static_func(empty_closure)), 0); |
| 232 | } |
| 233 | } |