From 8cf0e7d65469181ab21da6365ff905fa9c462a8f Mon Sep 17 00:00:00 2001 From: cnglen Date: Fri, 13 Feb 2026 13:19:32 +0800 Subject: [PATCH 1/2] Change the visibility of InputRef::full_slice() from pub(crate) to pub, enabling access to the complete raw input slice from within the imperative-style custom() method --- src/input.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/input.rs b/src/input.rs index 5cc99f35..6de68cdc 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1704,9 +1704,12 @@ impl<'src, 'parse, I: Input<'src>, E: ParserExtra<'src, I>> InputRef<'src, 'pars let _ = self.next_inner(); } + /// Get full slice of raw input. + /// + /// Note we have to make sure our index of full slice land in the correct boundary of utf8 character if using utf8 input. #[cfg_attr(not(feature = "regex"), allow(dead_code))] #[inline] - pub(crate) fn full_slice(&mut self) -> I::Slice + pub fn full_slice(&mut self) -> I::Slice where I: SliceInput<'src>, { From 8221f692e529b74af4e53d670d5b855eb24c1784 Mon Sep 17 00:00:00 2001 From: cnglen Date: Mon, 2 Mar 2026 12:58:05 +0800 Subject: [PATCH 2/2] Change the visibility of InputRef::full_slice() from pub(crate) to public: make the doc clear --- src/input.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/input.rs b/src/input.rs index 6de68cdc..3140c71e 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1705,8 +1705,6 @@ impl<'src, 'parse, I: Input<'src>, E: ParserExtra<'src, I>> InputRef<'src, 'pars } /// Get full slice of raw input. - /// - /// Note we have to make sure our index of full slice land in the correct boundary of utf8 character if using utf8 input. #[cfg_attr(not(feature = "regex"), allow(dead_code))] #[inline] pub fn full_slice(&mut self) -> I::Slice