From 3d09e925e80ee40b5ee52bf130392f475e49cc92 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 24 Jul 2023 16:37:47 -0500 Subject: [PATCH] feat(error): Add ParseError::into_error Found this useful within cargo-smart-release where the extra details aren't needed --- src/error.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/error.rs b/src/error.rs index d40e8244..765a2cb3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -750,6 +750,12 @@ impl ParseError { pub fn inner(&self) -> &E { &self.inner } + + /// The original [`ParserError`] + #[inline] + pub fn into_inner(self) -> E { + self.inner + } } impl core::fmt::Display for ParseError