2 releases

0.1.1 Apr 11, 2022
0.1.0 Apr 11, 2022

#130 in #derive-debug

49 downloads per month
Used in 3 crates (2 directly)

MIT license

4KB

disp

crates.io Documentation Build Status

derive Display for types that implement Debug

Example

mod hello {
    use std::fmt::Display;

    #[derive(Debug, disp::Display)]
    pub struct Hello {}
}

fn main() {
    let hello = hello::Hello {};
    println!("Debug: {hello:?}, world!");
    println!("Display: {hello}, world!");
}

Output:

Debug: Hello, world!
Display: Hello, world!

lib.rs:

disp

crates.io Documentation Build Status

derive Display for types that implement Debug

Example

mod hello {
    use std::fmt::Display;

    #[derive(Debug, disp::Display)]
    pub struct Hello {}
}

fn main() {
    let hello = hello::Hello {};
    println!("Debug: {hello:?}, world!");
    println!("Display: {hello}, world!");
}

Output:

Debug: Hello, world!
Display: Hello, world!

Dependencies

~1.5MB
~34K SLoC