Skip to content

Commit 33345da

Browse files
committed
Fixed several typos in libcollections
1 parent 321488b commit 33345da

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/libcollections/bit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ impl Bitv {
283283
x != 0
284284
}
285285

286-
/// Sets the value of a bit at a index `i`.
286+
/// Sets the value of a bit at an index `i`.
287287
///
288288
/// # Panics
289289
///
@@ -582,7 +582,7 @@ impl Bitv {
582582
///
583583
/// # Panics
584584
///
585-
/// Panics if the the `Bitv` and slice are of different length.
585+
/// Panics if the `Bitv` and slice are of different length.
586586
///
587587
/// # Example
588588
///

src/libcollections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ use ring_buf::RingBuf;
5353
/// and possibly other factors. Using linear search, searching for a random element is expected
5454
/// to take O(B log<sub>B</sub>n) comparisons, which is generally worse than a BST. In practice,
5555
/// however, performance is excellent. `BTreeMap` is able to readily outperform `TreeMap` under
56-
/// many workloads, and is competetive where it doesn't. BTreeMap also generally *scales* better
56+
/// many workloads, and is competitive where it doesn't. BTreeMap also generally *scales* better
5757
/// than TreeMap, making it more appropriate for large datasets.
5858
///
5959
/// However, `TreeMap` may still be more appropriate to use in many contexts. If elements are very

src/libcollections/btree/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct Node<K, V> {
4343
// theory, if we take full control of allocation like HashMap's RawTable does,
4444
// and restrict leaves to max size 256 (not unreasonable for a btree node) we can cut
4545
// this down to just (ptr, cap: u8, size: u8, is_leaf: bool). With generic
46-
// integer arguments, cap can even move into the the type, reducing this just to
46+
// integer arguments, cap can even move into the type, reducing this just to
4747
// (ptr, size, is_leaf). This could also have cache benefits for very small nodes, as keys
4848
// could bleed into edges and vals.
4949
//

src/libcollections/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ impl String {
549549
///
550550
/// # Warning
551551
///
552-
/// This is a O(n) operation as it requires copying every element in the
552+
/// This is an O(n) operation as it requires copying every element in the
553553
/// buffer.
554554
///
555555
/// # Panics
@@ -586,7 +586,7 @@ impl String {
586586
///
587587
/// # Warning
588588
///
589-
/// This is a O(n) operation as it requires copying every element in the
589+
/// This is an O(n) operation as it requires copying every element in the
590590
/// buffer.
591591
///
592592
/// # Panics

src/libcollections/trie/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ impl<'a, T> VacantEntry<'a, T> {
10561056
search_stack.map.root.count = temp;
10571057
value_ref
10581058
}
1059-
// Otherwise, find the predeccessor of the last stack node, and insert as normal.
1059+
// Otherwise, find the predecessor of the last stack node, and insert as normal.
10601060
else {
10611061
match *search_stack.get_ref(old_length - 2) {
10621062
Internal(box ref mut parent) => {
@@ -1739,7 +1739,7 @@ mod test {
17391739
// Update it to i^3 using the returned mutable reference.
17401740
*inserted_val = i * i * i;
17411741
},
1742-
_ => panic!("Non-existant key found.")
1742+
_ => panic!("Non-existent key found.")
17431743
}
17441744
assert_eq!(map.get(&i).unwrap(), &(i * i * i));
17451745
}

0 commit comments

Comments
 (0)