@@ -53,7 +53,7 @@ pub struct Node<K, V> {
5353 // hard. For now, we accept this cost in the name of correctness and simplicity.
5454 //
5555 // As a compromise, keys and vals could be merged into one Vec<(K, V)>, which would shave
56- // off 3 words, but possibly hurt our cache effeciency during search, which only cares about
56+ // off 3 words, but possibly hurt our cache efficiency during search, which only cares about
5757 // keys. This would also avoid the Zip we use in our iterator implementations. This is
5858 // probably worth investigating.
5959 //
@@ -72,7 +72,7 @@ impl<K: Ord, V> Node<K, V> {
7272 /// `GoDown` will be yielded with the index of the subtree the key must lie in.
7373 pub fn search ( & self , key : & K ) -> SearchResult {
7474 // FIXME(Gankro): Tune when to search linear or binary based on B (and maybe K/V).
75- // For the B configured as of this writing (B = 6), binary search was *singnificantly *
75+ // For the B configured as of this writing (B = 6), binary search was *significantly *
7676 // worse for uints.
7777 self . search_linear ( key)
7878 }
@@ -375,7 +375,7 @@ impl<K, V> Node<K, V> {
375375 }
376376 }
377377
378- /// Steal! Stealing is roughly analagous to a binary tree rotation.
378+ /// Steal! Stealing is roughly analogous to a binary tree rotation.
379379 /// In this case, we're "rotating" right.
380380 unsafe fn steal_to_left ( & mut self , underflowed_child_index : uint ) {
381381 // Take the biggest stuff off left
@@ -387,7 +387,7 @@ impl<K, V> Node<K, V> {
387387 }
388388 } ;
389389
390- // Swap the parent's seperating key-value pair with left's
390+ // Swap the parent's separating key-value pair with left's
391391 self . unsafe_swap ( underflowed_child_index - 1 , & mut key, & mut val) ;
392392
393393 // Put them at the start of right
@@ -402,7 +402,7 @@ impl<K, V> Node<K, V> {
402402 }
403403 }
404404
405- /// Steal! Stealing is roughly analagous to a binary tree rotation.
405+ /// Steal! Stealing is roughly analogous to a binary tree rotation.
406406 /// In this case, we're "rotating" left.
407407 unsafe fn steal_to_right ( & mut self , underflowed_child_index : uint ) {
408408 // Take the smallest stuff off right
@@ -414,7 +414,7 @@ impl<K, V> Node<K, V> {
414414 }
415415 } ;
416416
417- // Swap the parent's seperating key-value pair with right's
417+ // Swap the parent's separating key-value pair with right's
418418 self . unsafe_swap ( underflowed_child_index, & mut key, & mut val) ;
419419
420420 // Put them at the end of left
@@ -430,9 +430,9 @@ impl<K, V> Node<K, V> {
430430 }
431431
432432 /// Merge! Left and right will be smooshed into one node, along with the key-value
433- /// pair that seperated them in their parent.
433+ /// pair that separated them in their parent.
434434 unsafe fn merge_children ( & mut self , left_index : uint ) {
435- // Permanently remove right's index, and the key-value pair that seperates
435+ // Permanently remove right's index, and the key-value pair that separates
436436 // left and right
437437 let ( key, val, right) = {
438438 match ( self . keys . remove ( left_index) ,
@@ -448,7 +448,7 @@ impl<K, V> Node<K, V> {
448448 left. absorb ( key, val, right) ;
449449 }
450450
451- /// Take all the values from right, seperated by the given key and value
451+ /// Take all the values from right, separated by the given key and value
452452 fn absorb ( & mut self , key : K , val : V , right : Node < K , V > ) {
453453 // Just as a sanity check, make sure we can fit this guy in
454454 debug_assert ! ( self . len( ) + right. len( ) <= self . capacity( ) )
0 commit comments