From 73196f4dc33d23c72ebe65042b23ce17a34d23d1 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Fri, 4 Jun 2021 13:50:22 +0200 Subject: [PATCH] book: fix leftover old formatting syntax; typos --- book/src/macros.md | 2 +- book/src/ser-format-slice.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/book/src/macros.md b/book/src/macros.md index a4b093f6..fbddaaae 100644 --- a/book/src/macros.md +++ b/book/src/macros.md @@ -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; diff --git a/book/src/ser-format-slice.md b/book/src/ser-format-slice.md index 8b41ad6c..4770e211 100644 --- a/book/src/ser-format-slice.md +++ b/book/src/ser-format-slice.md @@ -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