pub fn check<T>(res: PResult<T>) -> Result<T, Self> {
        let (rest, value) = res.finish()?;
        if rest.fragment().is_empty() {
            Ok(value)
        } else {
            Err(ParseError::new("Expected end of file.", rest))
        }
    }
/// Check a nom result for errors.
///
/// This differs from a `From<nom::Err>` implementation in that an
/// `Ok` result with remaining unparsed data is also considered an
/// error.
Check a nom result for errors.
This differs from a `From` implementation in that an
`Ok` result with remaining unparsed data is also considered an
error.
Check a nom result for errors . This differs from a ` From ` implementation in that an ` Ok ` result with remaining unparsed data is also considered an error .
pub fn check<T>(res: PResult<T>) -> Result<T, Self> {
        let (rest, value) = res.finish()?;
        if rest.fragment().is_empty() {
            Ok(value)
        } else {
            Err(ParseError::new("Expected end of file.", rest))
        }
    }
pub fn check < T > ( res : PResult < T > ) -> Result < T , Self > { let ( rest , value ) = res . finish ( ) ? ; if rest . fragment ( ) . is_empty ( ) { Ok ( value ) } else { Err ( ParseError :: new ( " " , rest ) ) } }
Check a nom result for errors.
Check a nom result for errors .
res
PResult<T>
res
PResult<T>