From 8fe71aac360edf455e0e7562d80a25400bb45ccf Mon Sep 17 00:00:00 2001 From: Rahul Srivastava <117383410+rahul-srivastava-codes@users.noreply.github.com> Date: Fri, 4 Jul 2025 19:09:09 +0530 Subject: [PATCH] Update style-guide.md Explained Hard wrap with example --- style-guide.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/style-guide.md b/style-guide.md index 04dc805ca5..04d2775c17 100644 --- a/style-guide.md +++ b/style-guide.md @@ -8,7 +8,11 @@ *associated function* of` rather than `is an ‘associated function’ of`. - When talking about a method in prose, DO NOT include the parentheses, ex: `read_line` rather than `read_line()`. -- Hard wrap at 80 chars +- Hard wrap at 80 chars, means manually breaking lines in prose (not code) so that each line stays within 80 characters, like this:
+ `To read a line of input, we use the read_line method from the stdin handle. This is`
+ `an associated function of the io::stdin module.`
+ Instead of writing everything in a single long line like:
+ `To read a line of input, we use the read_line method from the stdin handle. This is an associated function of the io::stdin module.` - Prefer not mixing code and not-code in one word, ex: ``Remember when we wrote `use std::io`?`` rather than ``Remember when we `use`d `std::io`?``