rust/library/core/tests/fmt
Trevor Gross c1707aaf0b Shorten the MaybeUninit Debug implementation
Currently the `Debug` implementation for `MaybeUninit` winds up being
pretty verbose. This struct:

    #[derive(Debug)]
    pub struct Foo {
        pub a: u32,
        pub b: &'static str,
        pub c: MaybeUninit<u32>,
        pub d: MaybeUninit<String>,
    }

Prints as:

    Foo {
        a: 0,
        b: "hello",
        c: core::mem::maybe_uninit::MaybeUninit<u32>,
        d: core::mem::maybe_uninit::MaybeUninit<alloc::string::String>,
    }

The goal is just to be a standin for content so the path prefix doesn't
add any useful information. Change the implementation to trim
`MaybeUninit`'s leading path, meaning the new result is now:

    Foo {
        a: 0,
        b: "hello",
        c: MaybeUninit<u32>,
        d: MaybeUninit<alloc::string::String>,
    }
2024-11-22 19:46:34 -05:00
..
builders.rs Implement debug_more_non_exhaustive 2024-07-21 12:05:02 -05:00
float.rs Add tests for rounding of ties during float formatting 2022-10-20 22:09:24 +02:00
mod.rs Shorten the MaybeUninit Debug implementation 2024-11-22 19:46:34 -05:00
num.rs avoid exhaustive i16 test in Miri 2023-11-15 19:23:04 +01:00