about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorJoseph Crail <jbcrail@gmail.com>2014-04-21 00:49:39 -0400
committerJoseph Crail <jbcrail@gmail.com>2014-04-21 00:49:39 -0400
commit809f13ea9441d972b5777a9c8bf837add9484a45 (patch)
tree5d96475ab271730a20ff6532778b632504ab0c81 /src/libcollections
parent30348f46757ad0e68f69eccd31e5de345a010ac0 (diff)
downloadrust-809f13ea9441d972b5777a9c8bf837add9484a45.tar.gz
rust-809f13ea9441d972b5777a9c8bf837add9484a45.zip
Fix misspellings in comments.
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 03b486e628c..c3a36dc9359 100644
--- a/src/libcollections/hashmap.rs
+++ b/src/libcollections/hashmap.rs
@@ -587,7 +587,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
@@ -600,7 +600,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.
 //
@@ -681,7 +681,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.");
@@ -771,7 +771,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 } }