Skip to content

Commit f197ffe

Browse files
committed
Fix some typos
1 parent 976b193 commit f197ffe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/confpath.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl IntoIterator for ConfPath {
141141

142142
while !pos.is_root() {
143143
path.push(pos.clone());
144-
pos = pos.pop().unwrap().1; // We already checked that this is not the root node. So unwraping pop() is ok here.
144+
pos = pos.pop().unwrap().1; // We already checked that this is not the root node. So unwrapping pop() is ok here.
145145
}
146146

147147
path.into_iter().rev()
@@ -159,7 +159,7 @@ impl Display for ConfPath {
159159
write!(f, ".")?;
160160
}
161161

162-
// We already checked that this is not the root node. So unwraping pop() and tail_component_name() is ok here.
162+
// We already checked that this is not the root node. So unwrapping pop() and tail_component_name() is ok here.
163163
write!(f, "{}", pos.tail_component_name().unwrap())?;
164164
pos = pos.pop().unwrap().1;
165165

@@ -415,7 +415,7 @@ mod tests {
415415
assert_eq!(root1.push("a"), root1.push("a"));
416416
assert_eq!(root1.push_all(["a", "b"]), root1.clone() + "a" + "b");
417417

418-
// Make sure different paths do not compare qeual
418+
// Make sure different paths do not compare equal
419419
assert_ne!(root1.push_all(["a", "b"]), root1.push("a"));
420420
assert_ne!(root1.push_all(["a", "b"]), root1.push("b"));
421421

@@ -502,13 +502,13 @@ mod tests {
502502
// The order of the returned elements is not guaranteed. Therefore we've
503503
// to remove the returned elements form the reference_set and later
504504
// check if the set is empty.
505-
#[allow(clippy::mutable_key_type)] // This is one of the false positives mentioned in the docoumentation.
505+
#[allow(clippy::mutable_key_type)] // This is one of the false positives mentioned in the documentation.
506506
let mut reference_set: HashSet<ConfPath> = HashSet::from_iter([ConfPath::from(&["a"]), ConfPath::from(&["b"])].iter().cloned());
507507
cp.children().for_each(|c| assert!(reference_set.remove(&c), "Iterator returned too many elements."));
508508
assert_eq!(reference_set.len(), 0, "Iterator returned not enough elements.");
509509

510510
// Verify again with an intermediate node
511-
#[allow(clippy::mutable_key_type)] // This is one of the false positives mentioned in the docoumentation.
511+
#[allow(clippy::mutable_key_type)] // This is one of the false positives mentioned in the documentation.
512512
let mut reference_set: HashSet<ConfPath> = HashSet::from_iter([ConfPath::from(&["a", "a1"])].iter().cloned());
513513
cp.push("a").children().for_each(|c| assert!(reference_set.remove(&c), "Iterator returned too many elements."));
514514
assert_eq!(reference_set.len(), 0, "Iterator returned not enough elements.");
@@ -528,7 +528,7 @@ mod tests {
528528
// The order of the returned elements is not guaranteed. Therefore we've
529529
// to remove the returned elements form the reference_set and later
530530
// check if the set is empty.
531-
#[allow(clippy::mutable_key_type)] // This is one of the false positives mentioned in the docoumentation.
531+
#[allow(clippy::mutable_key_type)] // This is one of the false positives mentioned in the documentation.
532532
let mut reference_set: HashSet<ConfPath> = HashSet::from_iter([ConfPath::from(&["a"]), ConfPath::from(&["b"])].iter().cloned());
533533
root_child_iter.for_each(|c| assert!(reference_set.remove(&c), "Iterator returned to many elements."));
534534
assert_eq!(reference_set.len(), 0, "Iterator returned not enough elements.");

0 commit comments

Comments
 (0)