about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-22 05:06:33 -0700
committerbors <bors@rust-lang.org>2014-04-22 05:06:33 -0700
commitc46c7607a44d047f87e52fca66865b31a4f43b99 (patch)
tree9cfa9e1439dc02643b279fca674a9de9041047ec /src/libcollections
parentef1b929b2f732f96d6f9357467cf7b45b85c5413 (diff)
parent809f13ea9441d972b5777a9c8bf837add9484a45 (diff)
downloadrust-c46c7607a44d047f87e52fca66865b31a4f43b99.tar.gz
rust-c46c7607a44d047f87e52fca66865b31a4f43b99.zip
auto merge of #13653 : jbcrail/rust/fix-comment-mistakes, r=alexcrichton
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/btree.rs4
-rw-r--r--src/libcollections/hashmap.rs8
-rw-r--r--src/libcollections/treemap.rs2
-rw-r--r--src/libcollections/trie.rs2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/libcollections/btree.rs b/src/libcollections/btree.rs
index a258cf8b175..b6dc790ea88 100644
--- a/src/libcollections/btree.rs
+++ b/src/libcollections/btree.rs
@@ -659,13 +659,13 @@ impl<K: fmt::Show + TotalOrd, V: fmt::Show> fmt::Show for Branch<K, V> {
     }
 }
 
-//A LeafElt containts no left child, but a key-value pair.
+//A LeafElt contains no left child, but a key-value pair.
 struct LeafElt<K, V> {
     key: K,
     value: V
 }
 
-//A BranchElt has a left child in insertition to a key-value pair.
+//A BranchElt has a left child in insertion to a key-value pair.
 struct BranchElt<K, V> {
     left: ~Node<K, V>,
     key: K,
diff --git a/src/libcollections/hashmap.rs b/src/libcollections/hashmap.rs
index 5b65fe46089..f6a2b1c6250 100644
--- a/src/libcollections/hashmap.rs
+++ b/src/libcollections/hashmap.rs
@@ -605,7 +605,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
 //
 // > Why a load factor of 90%?
 //
-// In general, all the distances to inital buckets will converge on the mean.
+// In general, all the distances to initial buckets will converge on the mean.
 // At a load factor of α, the odds of finding the target bucket after k
 // probes is approximately 1-α^k. If we set this equal to 50% (since we converge
 // on the mean) and set k=8 (64-byte cache line / 8-byte hash), α=0.92. I round
@@ -618,7 +618,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
 // > Wait, what? Where did you get 1-α^k from?
 //
 // On the first probe, your odds of a collision with an existing element is α.
-// The odds of doing this twice in a row is approximatelly α^2. For three times,
+// The odds of doing this twice in a row is approximately α^2. For three times,
 // α^3, etc. Therefore, the odds of colliding k times is α^k. The odds of NOT
 // colliding after k tries is 1-α^k.
 //
@@ -692,7 +692,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
 /// let mut book_reviews = HashMap::new();
 ///
 /// // review some books.
-/// book_reviews.insert("Adventures of Hucklebury Fin",      "My favorite book.");
+/// book_reviews.insert("Adventures of Huckleberry Finn",    "My favorite book.");
 /// book_reviews.insert("Grimms' Fairy Tales",               "Masterpiece.");
 /// book_reviews.insert("Pride and Prejudice",               "Very enjoyable.");
 /// book_reviews.insert("The Adventures of Sherlock Holmes", "Eye lyked it alot.");
@@ -782,7 +782,7 @@ impl<K: TotalEq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
     /// from its 'ideal' location.
     ///
     /// In the cited blog posts above, this is called the "distance to
-    /// inital bucket", or DIB.
+    /// initial bucket", or DIB.
     fn bucket_distance(&self, index_of_elem: &table::FullIndex) -> uint {
         // where the hash of the element that happens to reside at
         // `index_of_elem` tried to place itself first.
diff --git a/src/libcollections/treemap.rs b/src/libcollections/treemap.rs
index 3db12b5a538..dc8e64ed86b 100644
--- a/src/libcollections/treemap.rs
+++ b/src/libcollections/treemap.rs
@@ -308,7 +308,7 @@ pub struct RevMutEntries<'a, K, V> {
 // (with many different `x`) below, so we need to optionally pass mut
 // as a tt, but the only thing we can do with a `tt` is pass them to
 // other macros, so this takes the `& <mutability> <operand>` token
-// sequence and forces their evalutation as an expression.
+// sequence and forces their evaluation as an expression.
 macro_rules! addr { ($e:expr) => { $e }}
 // putting an optional mut into type signatures
 macro_rules! item { ($i:item) => { $i }}
diff --git a/src/libcollections/trie.rs b/src/libcollections/trie.rs
index e831b394b9c..e040bb0a9e5 100644
--- a/src/libcollections/trie.rs
+++ b/src/libcollections/trie.rs
@@ -141,7 +141,7 @@ impl<T> TrieMap<T> {
 // (with many different `x`) below, so we need to optionally pass mut
 // as a tt, but the only thing we can do with a `tt` is pass them to
 // other macros, so this takes the `& <mutability> <operand>` token
-// sequence and forces their evalutation as an expression. (see also
+// sequence and forces their evaluation as an expression. (see also
 // `item!` below.)
 macro_rules! addr { ($e:expr) => { $e } }