From 48a9ffa57a69ecabb03d3aa903e9188f60890ce5 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Mon, 23 Jan 2023 15:35:17 +0000 Subject: [PATCH] Explicitly state "compilation modes" I'm a Rust newbie. When I first read the line "Wrap in all modes...", I first thought that "mode" referred to different modes of the `wrapping_` method. It took me a minute to realise that "mode" referred to the _compilation_ mode! (Maybe I'm a bit sleepy today!) So I'd propose that the text explicitly says "compilation modes", to make the meaning as clear as possible :) --- src/ch03-02-data-types.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ch03-02-data-types.md b/src/ch03-02-data-types.md index bedf1450cc..9c5b9b9ef3 100644 --- a/src/ch03-02-data-types.md +++ b/src/ch03-02-data-types.md @@ -118,7 +118,8 @@ some sort of collection. > To explicitly handle the possibility of overflow, you can use these families > of methods provided by the standard library for primitive numeric types: > -> * Wrap in all modes with the `wrapping_*` methods, such as `wrapping_add`. +> * Wrap in all compilation modes with the `wrapping_*` methods, such as +> `wrapping_add`. > * Return the `None` value if there is overflow with the `checked_*` methods. > * Return the value and a boolean indicating whether there was overflow with > the `overflowing_*` methods.