Fix typos.
diff --git a/README.rst b/README.rst
index 383a709..9ef8f06 100644
--- a/README.rst
+++ b/README.rst
@@ -39,7 +39,7 @@
- 0.4.11
- - Fix ``petgraph::graph::NodeReferences`` to be publically visible
+ - Fix ``petgraph::graph::NodeReferences`` to be publicly visible
- Small doc typo and code style files by @shepmaster and @waywardmonkeys
- Fix a future compat warning with pointer casts
diff --git a/src/algo/dominators.rs b/src/algo/dominators.rs
index 80380af..fd41140 100644
--- a/src/algo/dominators.rs
+++ b/src/algo/dominators.rs
@@ -108,7 +108,7 @@
/// Algorithm"][0] discovered by Cooper et al.
///
/// This algorithm is **O(|V|²)**, and therefore has slower theoretical running time
-/// than the Lenguaer-Tarjan algorithm (which is **O(|E| log |V|)**. However,
+/// than the Lengauer-Tarjan algorithm (which is **O(|E| log |V|)**. However,
/// Cooper et al found it to be faster in practice on control flow graphs of up
/// to ~30,000 vertices.
///
diff --git a/src/generate.rs b/src/generate.rs
index 65b1c65..91ea64a 100644
--- a/src/generate.rs
+++ b/src/generate.rs
@@ -56,7 +56,7 @@
impl<Ty: EdgeType> Generator<Ty> {
/// Generate all possible graphs of a particular number of vertices.
///
- /// All permutations are generated, so the graphs are not unique down to isomorphim.
+ /// All permutations are generated, so the graphs are not unique down to isomorphism.
///
/// For a graph of *k* vertices there are *e = k²* possible edges and
/// *2<sup>k<sup>2</sup></sup>* graphs.
diff --git a/src/graph_impl/mod.rs b/src/graph_impl/mod.rs
index 29dfb87..e401c41 100644
--- a/src/graph_impl/mod.rs
+++ b/src/graph_impl/mod.rs
@@ -39,7 +39,7 @@
/// Trait for the unsigned integer type used for node and edge indices.
///
-/// Marked `unsafe` because: the trait must faithfully preseve
+/// Marked `unsafe` because: the trait must faithfully preserve
/// and convert index values.
pub unsafe trait IndexType : Copy + Default + Hash + Ord + fmt::Debug + 'static
{
diff --git a/src/graph_impl/stable_graph/mod.rs b/src/graph_impl/stable_graph/mod.rs
index 8819631..293efaa 100644
--- a/src/graph_impl/stable_graph/mod.rs
+++ b/src/graph_impl/stable_graph/mod.rs
@@ -445,7 +445,7 @@
/// Invalidates the edge index `e` but no other.
///
/// Computes in **O(e')** time, where **e'** is the number of edges
- /// conneced to the same endpoints as `e`.
+ /// connected to the same endpoints as `e`.
pub fn remove_edge(&mut self, e: EdgeIndex<Ix>) -> Option<E> {
// every edge is part of two lists,
// outgoing and incoming edges.
diff --git a/src/graph_impl/stable_graph/serialization.rs b/src/graph_impl/stable_graph/serialization.rs
index e44aa21..bc26c57 100644
--- a/src/graph_impl/stable_graph/serialization.rs
+++ b/src/graph_impl/stable_graph/serialization.rs
@@ -47,7 +47,7 @@
edges: Vec<Edge<Option<E>, Ix>>,
}
-/// Somes are the present node weights N, with known length.
+/// `Somes` are the present node weights N, with known length.
struct Somes<T>(usize, T);
impl<'a, N, Ix> Serialize for Somes<&'a [Node<Option<N>, Ix>]>
diff --git a/src/graphmap.rs b/src/graphmap.rs
index 6b6cab4..5adac89 100644
--- a/src/graphmap.rs
+++ b/src/graphmap.rs
@@ -51,7 +51,7 @@
///
/// It uses an combined adjacency list and sparse adjacency matrix
/// representation, using **O(|V| + |E|)** space, and allows testing for edge
-/// existance in constant time.
+/// existence in constant time.
///
/// `GraphMap` is parameterized over:
///
@@ -132,7 +132,7 @@
(self.nodes.capacity(), self.edges.capacity())
}
- /// Use their natual order to map the node pair (a, b) to a canonical edge id.
+ /// Use their natural order to map the node pair (a, b) to a canonical edge id.
#[inline]
fn edge_key(a: N, b: N) -> (N, N) {
if Ty::is_directed() {
diff --git a/src/lib.rs b/src/lib.rs
index 7554774..7c6f82a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -153,7 +153,7 @@
pub enum Undirected { }
copyclone!(Undirected);
-/// A graph's edge type determines whether is has directed edges or not.
+/// A graph's edge type determines whether it has directed edges or not.
pub trait EdgeType {
fn is_directed() -> bool;
}
diff --git a/src/visit/dfsvisit.rs b/src/visit/dfsvisit.rs
index e0ba22e..79df937 100644
--- a/src/visit/dfsvisit.rs
+++ b/src/visit/dfsvisit.rs
@@ -119,7 +119,7 @@
///
/// If the return value of the visitor is simply `()`, the visit runs until it
/// is finished. If the return value is a `Control<B>`, it can be used to
-/// change the control flow of the search. `Control::Break` will stop the
+/// change the control flow of the search. `Control::Break` will stop
/// the visit early, returning the contained value from the function.
/// `Control::Prune` will stop traversing any additional edges from the current
/// node and proceed immediately to the `Finish` event.
diff --git a/src/visit/macros.rs b/src/visit/macros.rs
index 7fa3245..da24542 100644
--- a/src/visit/macros.rs
+++ b/src/visit/macros.rs
@@ -2,7 +2,7 @@
/// Define a trait as usual, and a macro that can be used to instantiate
/// implementations of it.
///
-/// There *must* be section markers in the trait defition:
+/// There *must* be section markers in the trait definition:
/// @section type for associated types
/// @section self for methods
/// @section nodelegate for arbitrary tail that is not forwarded.