fn boundary(&mut self) -> usize {

		/// self.temp *should* be sorted by (hash, key); let's check!
		debug_assert!((1 .. self.temp.len()).all(|i| self.temp[i-1].key < self.temp[i].key));

		let boundary = self.vals.boundary();

		if self.temp.len() > 0 {

			// push doesn't know the length at the end; must write it
			if !self.temp[self.temp.len()-1].is_some() {
				let pos = self.temp.len()-1;
				self.temp[pos].set_upper(boundary);
			}

			// having densely packed everything, we now want to extend the allocation and rewrite the contents 
			// so that their spacing is in line with how robin hood hashing works.
			let lower = self.keys.len();
			if self.temp.len() < (1 << MINIMUM_SHIFT) {
				self.keys.extend(self.temp.drain(..));
			}
			else {
				let target = (BLOAT_FACTOR * (self.temp.len() as f64)) as u64;
				let mut shift = MINIMUM_SHIFT;
				while  (1 << shift) < target {
					shift += 1;
				}

				self.keys.reserve(1 << shift);

				// now going to start pushing things in to self.keys
				let mut cursor: usize = 0;	// <-- current write pos in self.keys.
				for entry in self.temp.drain(..) {
					// acquire top `shift` bits from `key.hashed()`
					let target = (entry.key.hashed().as_u64() >> ((<K as Hashable>::Output::bytes() * 8) - shift)) as usize;
					debug_assert!(target < (1 << shift));

					while cursor < target {
						// filling with bogus stuff
						self.keys.push(Entry::empty());
						cursor += 1;
					}
					self.keys.push(entry);
					cursor += 1;
				}

				// fill out the space, if not full.
				while cursor < (1 << shift) {
					self.keys.push(Entry::empty());
					cursor += 1;
				}

				// assert that we haven't doubled the allocation (would confuse the "what is shift?" logic)
				assert!((self.keys.len() - lower) < (2 << shift));
			}
		}

		self.keys.len()
	}
/// Looks at the contents of self.temp and extends self.keys appropriately.
///
/// This is where the "hash map" structure is produced. Up until this point, all (key, usize) pairs were 
/// committed to self.temp, where they awaited layout. That now happens here.
Looks at the contents of self.temp and extends self.keys appropriately.
This is where the "hash map" structure is produced. Up until this point, all (key, usize) pairs were
committed to self.temp, where they awaited layout. That now happens here.
Looks at the contents of self . temp and extends self . keys appropriately . This is where the " hash map " structure is produced . Up until this point all ( key usize ) pairs were committed to self . temp where they awaited layout . That now happens here .
fn boundary(&mut self) -> usize {
		/// self.temp *should* be sorted by (hash, key); let's check!
		debug_assert!((1 .. self.temp.len()).all(|i| self.temp[i-1].key < self.temp[i].key));
		let boundary = self.vals.boundary();
		if self.temp.len() > 0 {
			// push doesn't know the length at the end; must write it
			if !self.temp[self.temp.len()-1].is_some() {
				let pos = self.temp.len()-1;
				self.temp[pos].set_upper(boundary);
			}
			// having densely packed everything, we now want to extend the allocation and rewrite the contents 
			// so that their spacing is in line with how robin hood hashing works.
			let lower = self.keys.len();
			if self.temp.len() < (1 << MINIMUM_SHIFT) {
				self.keys.extend(self.temp.drain(..));
			}
			else {
				let target = (BLOAT_FACTOR * (self.temp.len() as f64)) as u64;
				let mut shift = MINIMUM_SHIFT;
				while  (1 << shift) < target {
					shift += 1;
				}
				self.keys.reserve(1 << shift);
				// now going to start pushing things in to self.keys
				let mut cursor: usize = 0;	// <-- current write pos in self.keys.
				for entry in self.temp.drain(..) {
					// acquire top `shift` bits from `key.hashed()`
					let target = (entry.key.hashed().as_u64() >> ((<K as Hashable>::Output::bytes() * 8) - shift)) as usize;
					debug_assert!(target < (1 << shift));
					while cursor < target {
						// filling with bogus stuff
						self.keys.push(Entry::empty());
						cursor += 1;
					}
					self.keys.push(entry);
					cursor += 1;
				}
				// fill out the space, if not full.
				while cursor < (1 << shift) {
					self.keys.push(Entry::empty());
					cursor += 1;
				}
				// assert that we haven't doubled the allocation (would confuse the "what is shift?" logic)
				assert!((self.keys.len() - lower) < (2 << shift));
			}
		}
		self.keys.len()
	}
fn boundary ( & mut self ) -> usize { /// self.temp *should* be sorted by (hash, key); let's check! debug_assert ! ( ( 1 self temp len ( ) ) all ( i self temp [ i 1 ] key self temp [ i ] key ) ) ; let boundary = self . vals . boundary ( ) ; if self . temp . len ( ) > 0 { // push doesn't know the length at the end; must write it if ! self . temp [ self . temp . len ( ) - 1 ] . is_some ( ) { let pos = self . temp . len ( ) - 1 ; self . temp [ pos ] . set_upper ( boundary ) ; } // having densely packed everything, we now want to extend the allocation and rewrite the contents  // so that their spacing is in line with how robin hood hashing works. let lower = self . keys . len ( ) ; if self . temp . len ( ) < ( 1 << MINIMUM_SHIFT ) { self . keys . extend ( self . temp . drain ( .. ) ) ; } else { let target = ( BLOAT_FACTOR * ( self . temp . len ( ) as f64 ) ) as u64 ; let mut shift = MINIMUM_SHIFT ; while ( 1 << shift ) < target { shift += 1 ; } self . keys . reserve ( 1 << shift ) ; // now going to start pushing things in to self.keys let mut cursor : usize = 0 ; // <-- current write pos in self.keys. for entry in self . temp . drain ( .. ) { // acquire top `shift` bits from `key.hashed()` let target = ( entry . key . hashed ( ) . as_u64 ( ) >> ( ( < K as Hashable > :: Output :: bytes ( ) * 8 ) - shift ) ) as usize ; debug_assert ! ( target ( 1 shift ) ) ; while cursor < target { // filling with bogus stuff self . keys . push ( Entry :: empty ( ) ) ; cursor += 1 ; } self . keys . push ( entry ) ; cursor += 1 ; } // fill out the space, if not full. while cursor < ( 1 << shift ) { self . keys . push ( Entry :: empty ( ) ) ; cursor += 1 ; } // assert that we haven't doubled the allocation (would confuse the "what is shift?" logic) assert ! ( ( self keys len ( ) lower ) ( 2 shift ) ) ; } } self . keys . len ( ) }
Looks at the contents of self.temp and extends self.keys appropriately.
Looks at the contents of self . temp and extends self . keys appropriately .
&mut self
&mut self