fn copy_range(&mut self, other: &Self::Trie, lower: usize, upper: usize) {
		if lower < upper {
			let other_basis = other.lower(lower);	// from where in `other` the offsets do start.
			let self_basis = self.vals.boundary();	// from where in `self` the offsets must start.
			for index in lower .. upper {
				let other_entry = &other.keys[index];
				let new_entry = if other_entry.is_some() {
					Entry::new(
						other_entry.key.clone(), 
						(other_entry.get_lower() + self_basis) - other_basis,
						(other_entry.get_upper() + self_basis) - other_basis,
					)
				}
				else { Entry::empty() };
				self.keys.push(new_entry);
			}
			self.vals.copy_range(&other.vals, other.lower(lower), other.upper(upper-1));
			self.boundary();	// <-- perhaps unnecessary, but ...
		}	
	}
/// Copies fully formed ranges (note plural) of keys from another trie.
///
/// While the ranges are fully formed, the offsets in them are relative to the other trie, and
/// must be corrected. These keys must be moved immediately to self.keys, as there is no info
/// about boundaries between them, and we are unable to lay out the info any differently.
Copies fully formed ranges (note plural) of keys from another trie.
While the ranges are fully formed, the offsets in them are relative to the other trie, and
must be corrected. These keys must be moved immediately to self.keys, as there is no info
about boundaries between them, and we are unable to lay out the info any differently.
Copies fully formed ranges ( note plural ) of keys from another trie . While the ranges are fully formed the offsets in them are relative to the other trie and must be corrected . These keys must be moved immediately to self . keys as there is no info about boundaries between them and we are unable to lay out the info any differently .
fn copy_range(&mut self, other: &Self::Trie, lower: usize, upper: usize) {
		if lower < upper {
			let other_basis = other.lower(lower);	// from where in `other` the offsets do start.
			let self_basis = self.vals.boundary();	// from where in `self` the offsets must start.
			for index in lower .. upper {
				let other_entry = &other.keys[index];
				let new_entry = if other_entry.is_some() {
					Entry::new(
						other_entry.key.clone(), 
						(other_entry.get_lower() + self_basis) - other_basis,
						(other_entry.get_upper() + self_basis) - other_basis,
					)
				}
				else { Entry::empty() };
				self.keys.push(new_entry);
			}
			self.vals.copy_range(&other.vals, other.lower(lower), other.upper(upper-1));
			self.boundary();	// <-- perhaps unnecessary, but ...
		}	
	}
fn copy_range ( & mut self , other : & Self :: Trie , lower : usize , upper : usize ) { if lower < upper { let other_basis = other . lower ( lower ) ; // from where in `other` the offsets do start. let self_basis = self . vals . boundary ( ) ; // from where in `self` the offsets must start. for index in lower .. upper { let other_entry = & other . keys [ index ] ; let new_entry = if other_entry . is_some ( ) { Entry :: new ( other_entry . key . clone ( ) , ( other_entry . get_lower ( ) + self_basis ) - other_basis , ( other_entry . get_upper ( ) + self_basis ) - other_basis , ) } else { Entry :: empty ( ) } ; self . keys . push ( new_entry ) ; } self . vals . copy_range ( & other . vals , other . lower ( lower ) , other . upper ( upper - 1 ) ) ; self . boundary ( ) ; // <-- perhaps unnecessary, but ... } }
Copies fully formed ranges (note plural) of keys from another trie.
Copies fully formed ranges ( note plural ) of keys from another trie .
&mut self
other
&Self::Trie
lower
usize
upper
usize
&mut self
other
&Self::Trie
lower
usize
upper
usize