add blank lines & returned output type comment to MapErrWithSpan

This commit is contained in:
@brody4hire - C. Jonathan Brody authored and Connor Fitzgerald committed 2025-01-29 20:22:56 -05:00
1 parent 1f2cc66f4e
commit 58cbb93213
1 file changed
+3
+3
View File
@@ -383,7 +383,9 @@ impl<T> SpanProvider<T> for UniqueArena<T> {
/// Convenience trait for [`Result`], adding a [`MapErrWithSpan::map_err_inner`]
/// mapping to [`WithSpan::and_then`].
pub trait MapErrWithSpan<E, E2>: Sized {
/// The returned output type.
type Output: Sized;
fn map_err_inner<F, E3>(self, func: F) -> Self::Output
where
F: FnOnce(E) -> WithSpan<E3>,
@@ -392,6 +394,7 @@ pub trait MapErrWithSpan<E, E2>: Sized {
impl<T, E, E2> MapErrWithSpan<E, E2> for Result<T, WithSpan<E>> {
type Output = Result<T, WithSpan<E2>>;
fn map_err_inner<F, E3>(self, func: F) -> Result<T, WithSpan<E2>>
where
F: FnOnce(E) -> WithSpan<E3>,