From 30f464b55ac943001c09be35d7c24086e7cab439 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 22 Jan 2025 07:49:12 -0600 Subject: [PATCH] fix: Deprecate IResult --- src/error.rs | 13 ++----------- src/parser.rs | 5 +++-- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/error.rs b/src/error.rs index b3896339..01c8d031 100644 --- a/src/error.rs +++ b/src/error.rs @@ -42,17 +42,8 @@ use crate::Parser; /// - [`ErrMode::into_inner`] pub type PResult = Result>; -/// For use with [`Parser::parse_peek`] which allows the input stream to be threaded through a -/// parser. -/// -/// - `Ok((I, O))` is the remaining [input][crate::stream] and the parsed value -/// - [`Err(ErrMode)`][ErrMode] is the error along with how to respond to it -/// -/// By default, the error type (`E`) is [`InputError`] -/// -/// When integrating into the result of the application, see -/// - [`Parser::parse`] -/// - [`ErrMode::into_inner`] +/// Deprecated, replaced with [`PResult`] +#[deprecated(since = "0.6.25", note = "Replaced with `PResult`")] pub type IResult> = PResult<(I, O), E>; #[cfg(test)] diff --git a/src/parser.rs b/src/parser.rs index 45bab0b0..1162c147 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -5,7 +5,7 @@ use crate::combinator::impls; #[cfg(feature = "unstable-recover")] #[cfg(feature = "std")] use crate::error::FromRecoverableError; -use crate::error::{AddContext, FromExternalError, IResult, PResult, ParseError, ParserError}; +use crate::error::{AddContext, FromExternalError, PResult, ParseError, ParserError}; use crate::stream::{Compare, Location, ParseSlice, Stream, StreamIsPartial}; #[cfg(feature = "unstable-recover")] #[cfg(feature = "std")] @@ -1284,8 +1284,9 @@ where /// Deprecated #[inline(always)] #[deprecated(since = "0.6.23")] +#[allow(deprecated)] pub fn unpeek<'a, I, O, E>( - mut peek: impl FnMut(I) -> IResult + 'a, + mut peek: impl FnMut(I) -> crate::error::IResult + 'a, ) -> impl FnMut(&mut I) -> PResult where I: Clone,