Skip to content

Commit

Permalink
Fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored and Geal committed Jun 28, 2019
1 parent be0a3fd commit da2ba9a
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Please provide the following information with this pull request:
code, except for documentation typos)
- a test case reproducing the issue. You can write it in [issues.rs](https://github.com/Geal/nom/blob/master/tests/issues.rs)
- if adding a new combinator, please add code documentation and some unit tests
in the same file. Also, pelase update the [combinatornator list](https://github.com/Geal/nom/blob/master/doc/choosing_a_combinator.md)
in the same file. Also, please update the [combinator list](https://github.com/Geal/nom/blob/master/doc/choosing_a_combinator.md)

## Code style

Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ bound. To get equivalent behaviour to `verbose-errors`, check out `nom::error::V

### Added

- `many0_count` abd `many1_count` to count applications of a parser instead of
- `many0_count` and `many1_count` to count applications of a parser instead of
accumulating its results in a `Vec`

### Fixed
Expand All @@ -126,7 +126,7 @@ accumulating its results in a `Vec`

- @xfix for fixing warnings, simplifying examples and performance fixes
- @dvberkel for documentation fixes
- @chifflier for fixinf warnings
- @chifflier for fixing warnings
- @myrrlyn for dead code elimination
- @petrochenkov for removing redundant test macros
- @tbelaire for documentation fixes
Expand Down Expand Up @@ -202,8 +202,8 @@ accumulating its results in a `Vec`
- @passy for typo fixes
- @ayrat555 for typo fixes
- @GuillaumeGomez for documentation fixes
- @jrakow for documentation fixes and fiwes for `switch!`
- @phlosioneer for dicumentation fixes
- @jrakow for documentation fixes and fixes for `switch!`
- @phlosioneer for documentation fixes
- @creativcoder for typo fixes
- @derekdreery for typo fixes
- @lucasem for implementing `Deref` on `CompleteStr` and `CompleteByteSlice`
Expand Down
2 changes: 1 addition & 1 deletion doc/archive/upgrading_to_nom_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ that transforms `Incomplete` in `Error`.
nom 4 is much stricter about the behaviour with partial data, but provides better tools to deal with it.
Thanks to the new `AtEof` trait for input types, nom now provides the `CompleteByteSlice(&[u8])` and
`CompleteStr(&str)` input types, for which the `at_eof()` method always returns true.
With these types, no need to put a `complete!()` combinator everywhere, you can juste apply those types
With these types, no need to put a `complete!()` combinator everywhere, you can just apply those types
like this:

```rust
Expand Down
2 changes: 1 addition & 1 deletion doc/custom_input_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Here are the traits we have to implement:
| [AsBytes](https://docs.rs/nom/latest/nom/trait.AsBytes.html) | casts the input type to a byte slice |
| [AsChar](https://docs.rs/nom/latest/nom/trait.AsChar.html) | transforms common types to a char for basic token parsing |
| [Compare](https://docs.rs/nom/latest/nom/trait.Compare.html) | character comparison operations |
| [ExtendInto](https://docs.rs/nom/latest/nom/trait.ExtendInto.html) |abtracts something which can extend an Extend |
| [ExtendInto](https://docs.rs/nom/latest/nom/trait.ExtendInto.html) |abstracts something which can extend an Extend |
| [FindSubstring](https://docs.rs/nom/latest/nom/trait.FindSubstring.html) | look for a substring in self |
| [FindToken](https://docs.rs/nom/latest/nom/trait.FindToken.html) |look for self in the given input stream |
| [InputIter](https://docs.rs/nom/latest/nom/trait.InputIter.html) | common iteration operations on the input type |
Expand Down
2 changes: 1 addition & 1 deletion examples/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ fn main() {
);

// nom also provides `the `VerboseError<Input>` type, which will generate a sort
// of backtrace of the path through the parser, accumulating info on input positons
// of backtrace of the path through the parser, accumulating info on input positions
// and affected parsers.
//
// This will print:
Expand Down
4 changes: 2 additions & 2 deletions src/bits/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::internal::{Err, IResult};
use crate::lib::std::ops::{AddAssign, RangeFrom, Shl, Shr, Div};
use crate::traits::{InputIter, InputLength, Slice, ToUsize};

/// generates a partser taking `count` bits
/// generates a parser taking `count` bits
pub fn take<I, O, C, E: ParseError<(I, usize)>>(count: C) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E>
where
I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength,
Expand Down Expand Up @@ -53,7 +53,7 @@ where
}
}

/// generates a partser taking `count` bits and comparing them to `pattern`
/// generates a parser taking `count` bits and comparing them to `pattern`
pub fn tag<I, O, C, E: ParseError<(I, usize)>>(pattern: O, count: C) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E>
where
I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength + Clone,
Expand Down
4 changes: 2 additions & 2 deletions src/bits/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::internal::{Err, IResult, Needed};
use crate::lib::std::ops::{AddAssign, RangeFrom, Shl, Shr, Div};
use crate::traits::{InputIter, InputLength, Slice, ToUsize};

/// generates a partser taking `count` bits
/// generates a parser taking `count` bits
pub fn take<I, O, C, E: ParseError<(I, usize)>>(count: C) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E>
where
I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength,
Expand Down Expand Up @@ -53,7 +53,7 @@ where
}
}

/// generates a partser taking `count` bits and comparing them to `pattern`
/// generates a parser taking `count` bits and comparing them to `pattern`
pub fn tag<I, O, C, E: ParseError<(I, usize)>>(pattern: O, count: C) -> impl Fn((I, usize)) -> IResult<(I, usize), O, E>
where
I: Slice<RangeFrom<usize>> + InputIter<Item = u8> + InputLength + Clone,
Expand Down
2 changes: 1 addition & 1 deletion src/branch/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
/// assert_eq!(result, Creature::Beast);
/// assert_eq!(rest, b" of Gevaudan");
///
/// // Given the input "demon hunter" the parser will return `Creature::Unkown(5)`
/// // Given the input "demon hunter" the parser will return `Creature::Unknown(5)`
/// // and the rest will be " hunter"
/// let (rest, result) = creature(b"demon hunter").unwrap();
/// assert_eq!(result, Creature::Unknown(5));
Expand Down
2 changes: 1 addition & 1 deletion src/combinator/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ macro_rules! map(
///
/// named!(parse<&str, u8>, map_res!(digit1, |s: &str| s.parse::<u8>()));
///
/// // the parser will convet the result of digit1 to a number
/// // the parser will convert the result of digit1 to a number
/// assert_eq!(parse("123"), Ok(("", 123)));
///
/// // this will fail if digit1 fails
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub trait ParseError<I>: Sized {
fn from_error_kind(input: I, kind: ErrorKind) -> Self;

/// combines an existing error with a new one created from the input
/// positionsition and an [ErrorKind]. This is useful when backtracking
/// position and an [ErrorKind]. This is useful when backtracking
/// through a parse tree, accumulating error context on the way
fn append(input: I, kind: ErrorKind, other: Self) -> Self;

Expand Down Expand Up @@ -61,7 +61,7 @@ pub fn make_error<I, E: ParseError<I>>(input: I, kind: ErrorKind) -> E {
}

/// combines an existing error with a new one created from the input
/// positionsition and an [ErrorKind]. This is useful when backtracking
/// position and an [ErrorKind]. This is useful when backtracking
/// through a parse tree, accumulating error context on the way
pub fn append_error<I, E: ParseError<I>>(input: I, kind: ErrorKind, other: E) -> E {
E::append(input, kind, other)
Expand Down
2 changes: 1 addition & 1 deletion src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Needed {
*self != Unknown
}

/// Maps a `Needed` to `Needed` by appling a function to a contained `Size` value.
/// Maps a `Needed` to `Needed` by applying a function to a contained `Size` value.
#[inline]
pub fn map<F: Fn(usize) -> usize>(self, f: F) -> Needed {
match self {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
//! input buffer can be full and need to be resized or refilled.
//!
//! A complete parser assumes that we already have all of the input data.
//! This will be the common case with small files that can be read intirely to
//! This will be the common case with small files that can be read entirely to
//! memory.
//!
//! Here is how it works in practice:
Expand Down
2 changes: 1 addition & 1 deletion src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ array_impls! {
30 31 32
}

/// abtracts something which can extend an `Extend`
/// abstracts something which can extend an `Extend`
/// used to build modified input slices in `escaped_transform`
pub trait ExtendInto {

Expand Down

0 comments on commit da2ba9a

Please sign in to comment.