add error trait impl for ParserError

This commit is contained in:
Edward Shen 2021-02-24 23:23:23 -05:00
parent a10567e770
commit 23e2a37785
Signed by: edward
GPG key ID: 19182661E818369F

View file

@ -19,9 +19,9 @@ use nom::error::{Error as NomError, ErrorKind};
use nom::multi::{many0, many1};
use nom::sequence::delimited;
use nom::IResult;
use std::borrow::Cow;
use std::fmt::Display;
use std::iter::FusedIterator;
use std::{borrow::Cow, error::Error};
/// Syntactic events that occurs in the config. Despite all these variants
/// holding a [`Cow`] instead over a simple reference, the parser will only emit
@ -205,6 +205,8 @@ impl Display for ParserError<'_> {
}
}
impl Error for ParserError<'_> {}
/// A zero-copy `git-config` file parser.
///
/// This is parser exposes low-level syntactic events from a `git-config` file.