relies on __entry being the last code object stored in the module after everything else is compiled
(&self)
| 17 | // relies on __entry being the last code object stored in the module |
| 18 | // after everything else is compiled |
| 19 | pub fn load_entry_code_object(&self) -> CompiledCodeObject { |
| 20 | let cco = self |
| 21 | .constants |
| 22 | .get(self.constants.len() - 1) |
| 23 | .expect("missing __entry constant"); |
| 24 | |
| 25 | cco.as_compiled_code_object() |
| 26 | .expect("__entry constant is not a code object") |
| 27 | .clone() |
| 28 | } |
| 29 | } |
no test coverage detected