pub fn walk_code_mut(code: &mut Code, p: usize, mut walker: impl FnMut(&mut Line))
{
    let mut queue = VecDeque::from(vec![p]);

    while let Some(first_idx) = queue.pop_front() {
        let mut last_idx = first_idx;

        capture_next_range(code, &mut queue, &mut last_idx);

        for instr in &mut code[first_idx .. last_idx + 1] {
            walker(instr);
        }
    }
}
/* A function for code walking that might result in modification to
 * the code. Otherwise identical to walk_code.
 */
A function for code walking that might result in modification to
the code. Otherwise identical to walk_code.
A function for code walking that might result in modification to the code . Otherwise identical to walk_code .
pub fn walk_code_mut(code: &mut Code, p: usize, mut walker: impl FnMut(&mut Line))
{
    let mut queue = VecDeque::from(vec![p]);
    while let Some(first_idx) = queue.pop_front() {
        let mut last_idx = first_idx;
        capture_next_range(code, &mut queue, &mut last_idx);
        for instr in &mut code[first_idx .. last_idx + 1] {
            walker(instr);
        }
    }
}
pub fn walk_code_mut ( code : & mut Code , p : usize , mut walker : impl FnMut ( & mut Line ) ) { let mut queue = VecDeque :: from ( vec ! [ p ] ) ; while let Some ( first_idx ) = queue . pop_front ( ) { let mut last_idx = first_idx ; capture_next_range ( code , & mut queue , & mut last_idx ) ; for instr in & mut code [ first_idx .. last_idx + 1 ] { walker ( instr ) ; } } }
A function for code walking that might result in modification to
 the code.
A function for code walking that might result in modification to the code .
code
&mut Code
p
usize
walker
impl FnMut(&mut Line)
code
&mut Code
p
usize
walker
impl FnMut(&mut Line)