/// Get mutable borrows of two sections simultaneously. Used during
/// instruction emission to provide references to the .text and .rodata
/// (constant pool) sections.
Get mutable borrows of two sections simultaneously. Used during
instruction emission to provide references to the .text and .rodata
(constant pool) sections.
Get mutable borrows of two sections simultaneously . Used during instruction emission to provide references to the . text and . rodata ( constant pool ) sections .
pub fn two_sections<'a>(
        &'a mut self,
        idx1: usize,
        idx2: usize,
    ) -> (&'a mut MachSection, &'a mut MachSection) {
        assert!(idx1 < idx2);
        assert!(idx1 < self.sections.len());
        assert!(idx2 < self.sections.len());
        let (first, rest) = self.sections.split_at_mut(idx2);
        (&mut first[idx1], &mut rest[0])
    }
pub fn two_sections < ' a > ( & ' a mut self , idx1 : usize , idx2 : usize , ) -> ( & ' a mut MachSection , & ' a mut MachSection ) { assert ! ( idx1 idx2 ) ; assert ! ( idx1 self sections len ( ) ) ; assert ! ( idx2 self sections len ( ) ) ; let ( first , rest ) = self . sections . split_at_mut ( idx2 ) ; ( & mut first [ idx1 ] , & mut rest [ 0 ] ) }
Get mutable borrows of two sections simultaneously.
Get mutable borrows of two sections simultaneously .
&'a mut self
idx1
usize
idx2
usize