derive_display_from_debug 0.1.2

A trivial Rust macro to derive the Display trait for any type with the Debug trait
Documentation

use std::fmt::Display;

use derive_display_from_debug::Display;

#[derive(Debug, Display)]
struct TestStruct {}

#[test]
fn test() {

    assert_eq!("TestStruct", format!("{:?}", TestStruct{}));
    assert_eq!("TestStruct", format!("{}", TestStruct{}));
}