Skip to content

Commit

Permalink
desc update
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodesdev committed Jun 14, 2024
1 parent e7b5947 commit cb701ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions challenges/mutable-references/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Rust's ownership model ensures memory safety without needing a garbage collector

**Mutable references** allow you to **modify** the value you are **borrowing**. **You can only have one mutable reference to a particular piece of data in a particular scope.** This prevents data races at compile time.

In Rust, `&mut` is used to create a **mutable reference**. This means that you can borrow a value and make changes to it without taking ownership. However, Rust enforces that there can only be one mutable reference to a particular piece of data in a particular scope. This ensures that no data races occur, as only one part of the code can modify the data at a time.

### Example

```rust
Expand Down

0 comments on commit cb701ee

Please sign in to comment.