disp

Crates.iodisp
lib.rsdisp
version0.1.1
sourcesrc
created_at2022-04-11 04:31:27.987081
updated_at2022-04-11 05:11:52.18709
descriptionderive Display from Debug
homepagehttps://github.com/btwiuse/disp
repositoryhttps://github.com/btwiuse/disp
max_upload_size
id565388
size4,591
(btwiuse)

documentation

https://docs.rs/disp

README

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!
Commit count: 0

cargo fmt