Return a mutable borrow to the code, suitable for editing. Must not be published. # Panics This method panics if the code has been published (and not subsequently unpublished).
(&mut self)
| 562 | /// This method panics if the code has been published (and not |
| 563 | /// subsequently unpublished). |
| 564 | pub fn text_mut(&mut self) -> &mut [u8] { |
| 565 | assert!(!self.published); |
| 566 | // SAFETY: we assert !published, which means we either have |
| 567 | // not yet applied readonly + execute permissions, or we have |
| 568 | // undone that and flipped back to read-write via unpublish. |
| 569 | unsafe { &mut self.mmap.as_mut_slice()[self.text.clone()] } |
| 570 | } |
| 571 | |
| 572 | unsafe fn register_unwind_info(&mut self) -> Result<()> { |
| 573 | if self.unwind.len() == 0 { |
no test coverage detected