debug-ignore 1.0.5

A newtype wrapper that causes a field to be skipped while printing out Debug output.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (c) The debug-ignore Contributors
// SPDX-License-Identifier: MIT OR Apache-2.0

extern crate debug_ignore;

use debug_ignore::DebugIgnore;

#[test]
fn test_transparent() {
    assert_eq!(
        serde_json::from_str::<DebugIgnore<_>>(r#""foo""#).unwrap(),
        DebugIgnore("foo")
    );
    assert_eq!(
        serde_json::to_string(&DebugIgnore("bar")).unwrap(),
        r#""bar""#,
    )
}