Coverage Report

Created: 2025-02-21 07:11

/rust/registry/src/index.crates.io-6f17d22bba15001f/miette-5.10.0/src/eyreish/fmt.rs
Line
Count
Source (jump to first uncovered line)
1
use super::{error::ErrorImpl, ptr::Ref};
2
use core::fmt;
3
4
impl ErrorImpl<()> {
5
0
    pub(crate) unsafe fn display(this: Ref<'_, Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result {
6
0
        this.deref()
7
0
            .handler
8
0
            .as_ref()
9
0
            .map(|handler| handler.display(Self::error(this), f))
10
0
            .unwrap_or_else(|| core::fmt::Display::fmt(Self::diagnostic(this), f))
11
0
    }
12
13
0
    pub(crate) unsafe fn debug(this: Ref<'_, Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14
0
        this.deref()
15
0
            .handler
16
0
            .as_ref()
17
0
            .map(|handler| handler.debug(Self::diagnostic(this), f))
18
0
            .unwrap_or_else(|| core::fmt::Debug::fmt(Self::diagnostic(this), f))
19
0
    }
20
}