Skip to content

Commit

Permalink
Merge pull request #506 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
mgeisler authored May 12, 2023
2 parents edc56bf + 1550dd0 commit 872f221
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This is a major feature release with two main changes:
instead of `usize` for fragment widths.

This fixes problems with overflows in the internal computations of
`wrap_optimal_fit` when fragments (words) or line lenghts had
`wrap_optimal_fit` when fragments (words) or line lengths had
extreme values, such as `usize::MAX`.

* [#438](https://github.com/mgeisler/textwrap/pull/438): Simplify
Expand Down Expand Up @@ -135,7 +135,7 @@ let options: Options<
> = Options::new(80);
```

This is quite a mouthful, so we suggest using type inferrence where
This is quite a mouthful, so we suggest using type inference where
possible. You won’t see any chance if you call `wrap` directly with a
width or with an `Options` value constructed on the fly. Please open
an issue if this causes problems for you!
Expand Down Expand Up @@ -486,7 +486,7 @@ Added a regression test for the case where `width` is set to

## Version 0.8.0 (2017-09-04)

The `Wrapper` stuct is now generic over the type of word splitter
The `Wrapper` struct is now generic over the type of word splitter
being used. This means less boxing and a nicer API. The
`Wrapper::word_splitter` method has been removed. This is a *breaking
API change* if you used the method to change the word splitter.
Expand Down
2 changes: 1 addition & 1 deletion src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn ch_width(ch: char) -> usize {
/// ## Emojis and CJK Characters
///
/// Characters such as emojis and [CJK characters] used in the
/// Chinese, Japanese, and Korean langauges are seen as double-width,
/// Chinese, Japanese, and Korean languages are seen as double-width,
/// even if the `unicode-width` feature is disabled:
///
/// ```
Expand Down
2 changes: 1 addition & 1 deletion src/word_splitters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub enum WordSplitter {

/// Use a custom function as the word splitter.
///
/// This varian lets you implement a custom word splitter using
/// This variant lets you implement a custom word splitter using
/// your own function.
///
/// # Examples
Expand Down
2 changes: 1 addition & 1 deletion src/wrap_algorithms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl WrapAlgorithm {

#[cfg(feature = "smawk")]
WrapAlgorithm::OptimalFit(penalties) => {
// The computation cannnot overflow when the line
// The computation cannot overflow when the line
// widths are restricted to usize.
wrap_optimal_fit(words, &f64_line_widths, penalties).unwrap()
}
Expand Down

0 comments on commit 872f221

Please sign in to comment.