Skip to content

Commit

Permalink
Merge #500
Browse files Browse the repository at this point in the history
500: book: fix leftover old formatting syntax; typos r=jonas-schievink a=Lotterleben



Co-authored-by: Lotte Steenbrink <lotte.steenbrink@ferrous-systems.com>
  • Loading branch information
bors[bot] and Lotte Steenbrink authored Jun 4, 2021
2 parents edb9880 + 73196f4 commit 65810dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion book/src/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Each macro logs at the logging level indicated in its name.
The syntax of these macros is roughly the same as the `println` macro.
Positional parameters are supported but named parameters are not.
Escaping rules are the same: the characters `{` and `}` are escaped as `{{` and `}}`.
The biggest different is in the supported formatting parameters (`:?`, `:>4`, `:04`).
The biggest difference is in the supported formatting parameters (`:?`, `:>4`, `:04`).

``` rust
# extern crate defmt;
Expand Down
6 changes: 3 additions & 3 deletions book/src/ser-format-slice.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ fn serialize() {
let xs = [X { y: Y { z: 42 }}, X { y: Y { z: 24 }}];
defmt::info!("{=[?]}", &xs[..]);
// on-the-wire: [
// 1, // "{:[?]}"
// 1, // "{=[?]}"
// 2, // `leb(xs.len())`
// 2, // "X {{ y: {:?} }}" / outer tag
// 3, // "Y {{ z: {:u8} }}" / inner tag
// 2, // "X {{ y: {=?} }}" / outer tag with format nesting through `=?`
// 3, // "Y {{ z: {=u8} }}" / inner tag
// 42, // xs[0].y.z
// (no tags for the second element)
// 24, // xs[1].y.z
Expand Down

0 comments on commit 65810dc

Please sign in to comment.