Skip to content

Fixed several typos in libcollections #19008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libcollections/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl Bitv {
x != 0
}

/// Sets the value of a bit at a index `i`.
/// Sets the value of a bit at an index `i`.
///
/// # Panics
///
Expand Down Expand Up @@ -582,7 +582,7 @@ impl Bitv {
///
/// # Panics
///
/// Panics if the the `Bitv` and slice are of different length.
/// Panics if the `Bitv` and slice are of different length.
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use ring_buf::RingBuf;
/// and possibly other factors. Using linear search, searching for a random element is expected
/// to take O(B log<sub>B</sub>n) comparisons, which is generally worse than a BST. In practice,
/// however, performance is excellent. `BTreeMap` is able to readily outperform `TreeMap` under
/// many workloads, and is competetive where it doesn't. BTreeMap also generally *scales* better
/// many workloads, and is competitive where it doesn't. BTreeMap also generally *scales* better
/// than TreeMap, making it more appropriate for large datasets.
///
/// However, `TreeMap` may still be more appropriate to use in many contexts. If elements are very
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct Node<K, V> {
// theory, if we take full control of allocation like HashMap's RawTable does,
// and restrict leaves to max size 256 (not unreasonable for a btree node) we can cut
// this down to just (ptr, cap: u8, size: u8, is_leaf: bool). With generic
// integer arguments, cap can even move into the the type, reducing this just to
// integer arguments, cap can even move into the type, reducing this just to
// (ptr, size, is_leaf). This could also have cache benefits for very small nodes, as keys
// could bleed into edges and vals.
//
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ impl String {
///
/// # Warning
///
/// This is a O(n) operation as it requires copying every element in the
/// This is an O(n) operation as it requires copying every element in the
/// buffer.
///
/// # Panics
Expand Down Expand Up @@ -586,7 +586,7 @@ impl String {
///
/// # Warning
///
/// This is a O(n) operation as it requires copying every element in the
/// This is an O(n) operation as it requires copying every element in the
/// buffer.
///
/// # Panics
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/trie/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ impl<'a, T> VacantEntry<'a, T> {
search_stack.map.root.count = temp;
value_ref
}
// Otherwise, find the predeccessor of the last stack node, and insert as normal.
// Otherwise, find the predecessor of the last stack node, and insert as normal.
else {
match *search_stack.get_ref(old_length - 2) {
Internal(box ref mut parent) => {
Expand Down Expand Up @@ -1739,7 +1739,7 @@ mod test {
// Update it to i^3 using the returned mutable reference.
*inserted_val = i * i * i;
},
_ => panic!("Non-existant key found.")
_ => panic!("Non-existent key found.")
}
assert_eq!(map.get(&i).unwrap(), &(i * i * i));
}
Expand Down