1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-11-27 08:27:34 +02:00

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 <gribozavr@gmail.com>
This commit is contained in:
Martin Geisler
2025-09-06 18:57:33 +02:00
committed by GitHub
parent 969668a552
commit 3fb6b7e164
3 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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)).

View File

@@ -24,7 +24,7 @@ The types have widths as follows:
<details>
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