Skip to content

Commit

Permalink
Unconditional Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Audun Skaugen committed Aug 31, 2023
1 parent 93b727d commit 62596f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,14 @@ pub mod recursive_oneof {
include!(concat!(env!("OUT_DIR"), "/recursive_oneof.rs"));
}

#[cfg(feature = "std")]
pub mod custom_debug {
include!(concat!(env!("OUT_DIR"), "/custom_debug.rs"));
impl fmt::Debug for Msg {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("Msg {..}")
}
}
}

/// This tests the custom attributes support by abusing docs.
Expand Down
6 changes: 0 additions & 6 deletions tests/src/skip_debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ fn oneof_with_enum_custom_debug() {
assert_eq!(format!("{:?}", msg), "MessageWithOneofCustomDebug {..}");
}

impl fmt::Debug for Msg {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str("Msg {..}")
}
}

/// Generated protobufs
#[test]
fn test_proto_msg_custom_debug() {
Expand Down

0 comments on commit 62596f3

Please sign in to comment.