Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodesdev committed Sep 11, 2024
1 parent c46b7ce commit e0faedf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion challenges/ownership-rules/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here are some important ownership rules to remember:

Before starting to solve the challenge, try to run the code and see what error you'll get. This will help you understand the problem better.

The compile error tells us that we can't borrow `s` as mutable because it is also borrowed as immutable. If we borrow it as mutable, the value will change the the compiler can not guarantee that the immutable reference hasn't changed.
The compile error tells us that we can't borrow `s` as mutable because it is also borrowed as immutable. If we borrow it as mutable, the value will change and the compiler can not guarantee that the immutable reference hasn't changed.

You are given a function `calculate_and_modify` that violates Rust's ownership rules. Your task is to identify and fix the ownership rule violations in this function.

Expand Down

0 comments on commit e0faedf

Please sign in to comment.