mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
Grammatical change from needs to requires
Both sentences are grammatically correct, as the verbs "requires" and "needs" can be used interchangeably in this context. However, the first sentence sounds more formal and is more commonly used in written English, especially in technical or academic contexts. In the context of your sentences (which are about programming), the first sentence: "Using pattern &mut V to match a mutable reference requires you to be very careful, due to V being a value after matching" sounds more suitable. It implies that the action (using the pattern &mut V) necessitates caution on the part of the user, due to the specific circumstance (that V becomes a value after matching). The second sentence: "Using pattern &mut V to match a mutable reference needs you to be very careful, due to V being a value after matching" is also correct but it sounds slightly less formal and is less commonly used in this kind of context. The verb "needs" is more often used to describe a necessity or requirement for a person or thing, rather than an action.
This commit is contained in:
@ -101,7 +101,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
6. 🌟🌟 Using pattern `&mut V` to match a mutable reference needs you to be very careful, due to `V` being a value after matching.
|
6. 🌟🌟 Using pattern `&mut V` to match a mutable reference requires you to be very careful, due to `V` being a value after matching.
|
||||||
```rust,editable
|
```rust,editable
|
||||||
|
|
||||||
// FIX the error with least changing
|
// FIX the error with least changing
|
||||||
|
Reference in New Issue
Block a user