From 43f928d8ceead593b5c899994afd8ddb793c82c6 Mon Sep 17 00:00:00 2001 From: Jan Monschke Date: Thu, 7 Jul 2022 22:27:24 +0200 Subject: [PATCH 1/2] docs: fixes two typos --- src/hello/print.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hello/print.md b/src/hello/print.md index efedeb79df..5618088c7c 100644 --- a/src/hello/print.md +++ b/src/hello/print.md @@ -64,11 +64,11 @@ fn main() { println!("This struct `{}` won't print...", Structure(3)); // FIXME ^ Comment out this line. - // For Rust 1.58 and above, you can directly capture the argument from + // For Rust 1.58 and above, you can directly capture the argument from a // surrounding variable. Just like the above, this will output // " 1". 5 white spaces and a "1". let number: f64 = 1.0; - let width: usize = 6; + let width: usize = 5; println!("{number:>width$}"); } ``` From 464f4ee8c40c25b1e21f6d1d9d8ea694186d67fa Mon Sep 17 00:00:00 2001 From: Jan Monschke Date: Thu, 7 Jul 2022 22:35:01 +0200 Subject: [PATCH 2/2] docs: revert to width = 6 --- src/hello/print.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hello/print.md b/src/hello/print.md index 5618088c7c..ea46a4fd63 100644 --- a/src/hello/print.md +++ b/src/hello/print.md @@ -68,7 +68,7 @@ fn main() { // surrounding variable. Just like the above, this will output // " 1". 5 white spaces and a "1". let number: f64 = 1.0; - let width: usize = 5; + let width: usize = 6; println!("{number:>width$}"); } ```