From 3c784d6e9d7b2dc0b9cdfe6a068bc674732b16be Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Fri, 22 Jul 2022 07:00:36 +0800 Subject: [PATCH] Fix typos and markdown (#36) --- CHANGELOG.md | 2 +- README.md | 9 ++++----- src/algorithms/myers.rs | 2 +- src/algorithms/utils.rs | 2 +- src/text/mod.rs | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba72a26..c3b9197 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ All notable changes to similar are documented here. ## 1.3.0 * Performance improvements for the LCS algorithm. -* Small performance improvments by adding an early opt-out for and inline highlighting. +* Small performance improvements by adding an early opt-out for and inline highlighting. * Added `IdentifyDistinct` to convert sequences to ints. * Small performance improvements for larger text diffs by using `IdentifyDistinct` automatically above a threshold. diff --git a/README.md b/README.md index 6ba7157..75b6c6c 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,7 @@ fn main() { ## License and Links -- [Documentation](https://docs.rs/similar/) -- [Issue Tracker](https://github.com/mitsuhiko/similar/issues) -- [Examples](https://github.com/mitsuhiko/similar/tree/main/examples) -- License: [Apache-2.0](https://github.com/mitsuhiko/similar/blob/main/LICENSE) - +* [Documentation](https://docs.rs/similar/) +* [Issue Tracker](https://github.com/mitsuhiko/similar/issues) +* [Examples](https://github.com/mitsuhiko/similar/tree/main/examples) +* License: [Apache-2.0](https://github.com/mitsuhiko/similar/blob/main/LICENSE) diff --git a/src/algorithms/myers.rs b/src/algorithms/myers.rs index 542c7ed..8a0c21d 100644 --- a/src/algorithms/myers.rs +++ b/src/algorithms/myers.rs @@ -12,7 +12,7 @@ //! # Heuristics //! //! At present this implementation of Myers' does not implement any more advanced -//! heuristics that would solve some pathological cases. For instane passing two +//! heuristics that would solve some pathological cases. For instance passing two //! large and completely distinct sequences to the algorithm will make it spin //! without making reasonable progress. Currently the only protection in the //! library against this is to pass a deadline to the diffing algorithm. diff --git a/src/algorithms/utils.rs b/src/algorithms/utils.rs index 0d14ac7..812f97d 100644 --- a/src/algorithms/utils.rs +++ b/src/algorithms/utils.rs @@ -11,7 +11,7 @@ pub fn is_empty_range>(range: &Range) -> bool { !(range.start < range.end) } -/// Represents an item in the vector returend by [`unique`]. +/// Represents an item in the vector returned by [`unique`]. /// /// It compares like the underlying item does it was created from but /// carries the index it was originally created from. diff --git a/src/text/mod.rs b/src/text/mod.rs index 729af35..dbad62b 100644 --- a/src/text/mod.rs +++ b/src/text/mod.rs @@ -56,7 +56,7 @@ impl TextDiffConfig { /// Sets a deadline for the diff operation. /// /// By default a diff will take as long as it takes. For certain diff - /// algorthms like Myer's and Patience a maximum running time can be + /// algorithms like Myer's and Patience a maximum running time can be /// defined after which the algorithm gives up and approximates. pub fn deadline(&mut self, deadline: Instant) -> &mut Self { self.deadline = Some(Deadline::Absolute(deadline));