From 3fb6b7e1642b8b83ac32ff894cc7158d45d5c4d1 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Sat, 6 Sep 2025 18:57:33 +0200 Subject: [PATCH] docs: improve language in types-and-values section (#2874) I asked Gemini to review the English for inconsistencies and grammar mistakes. This is the result and I hope it's useful! As a non-native speaker, it is hard for me to evaluate the finer details, so let me know if you would like to see changes (or even better: make them directly in the PR with the suggestion function). --------- Co-authored-by: Dmitri Gribenko --- src/types-and-values/exercise.md | 6 +++--- src/types-and-values/hello-world.md | 2 +- src/types-and-values/values.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types-and-values/exercise.md b/src/types-and-values/exercise.md index 467353bc..ea47abd1 100644 --- a/src/types-and-values/exercise.md +++ b/src/types-and-values/exercise.md @@ -4,10 +4,10 @@ minutes: 15 # Exercise: Fibonacci -The Fibonacci sequence begins with `[0,1]`. For n>1, the n'th Fibonacci number -is calculated recursively as the sum of the n-1'th and n-2'th Fibonacci numbers. +The Fibonacci sequence begins with `[0, 1]`. For `n > 1`, the next number is the +sum of the previous two. -Write a function `fib(n)` that calculates the n'th Fibonacci number. When will +Write a function `fib(n)` that calculates the nth Fibonacci number. When will this function panic? ```rust,editable,should_panic diff --git a/src/types-and-values/hello-world.md b/src/types-and-values/hello-world.md index b7c6ef74..9c9fc8bd 100644 --- a/src/types-and-values/hello-world.md +++ b/src/types-and-values/hello-world.md @@ -32,7 +32,7 @@ Key points: - Rust is very much like other languages in the C/C++/Java tradition. It is imperative and it doesn't try to reinvent things unless absolutely necessary. -- Rust is modern with full support for things like Unicode. +- Rust is modern with full support for Unicode. - Rust uses macros for situations where you want to have a variable number of arguments (no function [overloading](../control-flow-basics/functions.md)). diff --git a/src/types-and-values/values.md b/src/types-and-values/values.md index 71bef8e6..a5a662b6 100644 --- a/src/types-and-values/values.md +++ b/src/types-and-values/values.md @@ -24,7 +24,7 @@ The types have widths as follows:
-There are a few syntaxes which are not shown above: +There are a few syntaxes that are not shown above: - All underscores in numbers can be left out, they are for legibility only. So `1_000` can be written as `1000` (or `10_00`), and `123_i64` can be written as