Skip to content

Fix the documentation of what certain parse functions return #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ impl<'i: 't, 't> Parser<'i, 't> {
}

/// Have the given closure parse something, then check the the input is exhausted.
/// The result is overridden to `Err(())` if some input remains.
/// The result is overridden to an `Err(..)` if some input remains.
///
/// This can help tell e.g. `color: green;` from `color: green 4px;`
#[inline]
Expand Down Expand Up @@ -748,7 +748,7 @@ impl<'i: 't, 't> Parser<'i, 't> {
match self.parse_until_before(Delimiter::Comma, &mut parse_one) {
Ok(v) => values.push(v),
Err(e) if !ignore_errors => return Err(e),
Err(_) => {},
Err(_) => {}
}
match self.next() {
Err(_) => return Ok(values),
Expand All @@ -768,7 +768,7 @@ impl<'i: 't, 't> Parser<'i, 't> {
/// The given closure is called with a "delimited" parser
/// that stops at the end of the block or function (at the matching closing token).
///
/// The result is overridden to `Err(())` if the closure leaves some input before that point.
/// The result is overridden to an `Err(..)` if the closure leaves some input before that point.
#[inline]
pub fn parse_nested_block<F, T, E>(&mut self, parse: F) -> Result<T, ParseError<'i, E>>
where
Expand All @@ -784,7 +784,7 @@ impl<'i: 't, 't> Parser<'i, 't> {
/// that stops before the first character at this block/function nesting level
/// that matches the given set of delimiters, or at the end of the input.
///
/// The result is overridden to `Err(())` if the closure leaves some input before that point.
/// The result is overridden to an `Err(..)` if the closure leaves some input before that point.
#[inline]
pub fn parse_until_before<F, T, E>(
&mut self,
Expand Down