From c00650b3f102e4902ce672097d3bcd4ab7512350 Mon Sep 17 00:00:00 2001 From: stfn2xu Date: Mon, 9 Feb 2026 10:26:37 -0500 Subject: [PATCH] Use recommended message style in example The first example in ch03-02 had a message in the `expect` call written contrary to style recommendations in https://doc.rust-lang.org/stable/std/error/index.html#common-message-styles The example was not *wrong*, just missing an opportunity to reinforce style norms for beginners. --- src/ch03-02-data-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch03-02-data-types.md b/src/ch03-02-data-types.md index 2aa8b79cd8..bc2b9f2f39 100644 --- a/src/ch03-02-data-types.md +++ b/src/ch03-02-data-types.md @@ -13,7 +13,7 @@ Number”][comparing-the-guess-to-the-secret-number] section in Chapter 2, we must add a type annotation, like this: ```rust -let guess: u32 = "42".parse().expect("Not a number!"); +let guess: u32 = "42".parse().expect("value should parse to a number"); ``` If we don’t add the `: u32` type annotation shown in the preceding code, Rust