Skip to content

Commit

Permalink
mention skip_if in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
panicbit committed Jan 22, 2024
1 parent 01053db commit 9c7acd0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Here is a showcase of all possible field attributes:
x: i32,
#[debug(skip)]
y: i32,
#[debug(with = "hex_fmt")]
#[debug(with = hex_fmt)]
z: i32,
#[debug(skip_if = Option::is_none)]
label: Option<String>,
}

fn hex_fmt<T: fmt::Debug>(n: &T, f: &mut fmt::Formatter) -> fmt::Result {
Expand All @@ -32,4 +34,4 @@ Foo {
x: 42 things,
z: 0xAB
}
```
```

0 comments on commit 9c7acd0

Please sign in to comment.