fn remove_old_namespace(&mut self, curdepth: usize, cur_offset: UnitOffset) {
        let oldlen = self.ns_parts.len();
        while let Some((_, last_depth)) = self.ns_parts.last() {
            if *last_depth >= curdepth {
                self.ns_parts.pop();
            } else {
                break;
            }
        }
        // if we updated the namespace
        if oldlen != self.ns_parts.len() {
            self.render_namespace(cur_offset)
        }
    }
// cleanup namespace stack if we encounter a new namespace
cleanup namespace stack if we encounter a new namespace
cleanup namespace stack if we encounter a new namespace
fn remove_old_namespace(&mut self, curdepth: usize, cur_offset: UnitOffset) {
        let oldlen = self.ns_parts.len();
        while let Some((_, last_depth)) = self.ns_parts.last() {
            if *last_depth >= curdepth {
                self.ns_parts.pop();
            } else {
                break;
            }
        }
        // if we updated the namespace
        if oldlen != self.ns_parts.len() {
            self.render_namespace(cur_offset)
        }
    }
fn remove_old_namespace ( & mut self , curdepth : usize , cur_offset : UnitOffset ) { let oldlen = self . ns_parts . len ( ) ; while let Some ( ( _ , last_depth ) ) = self . ns_parts . last ( ) { if * last_depth >= curdepth { self . ns_parts . pop ( ) ; } else { break ; } } // if we updated the namespace if oldlen != self . ns_parts . len ( ) { self . render_namespace ( cur_offset ) } }
cleanup namespace stack if we encounter a new namespace
cleanup namespace stack if we encounter a new namespace
&mut self
curdepth
usize
cur_offset
UnitOffset
&mut self
curdepth
usize
cur_offset
UnitOffset