Skip to content

Commit

Permalink
vault backup: 2023-11-07 11:39:10
Browse files Browse the repository at this point in the history
Affected files:
content/notes/university/year3/cs3072/cs3072-rust-borrowing-mechanism.md
  • Loading branch information
pietraferreira committed Nov 7, 2023
1 parent 2d91846 commit f840bdb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,8 @@ fn calculate_length(s: &String) -> usize {
fn change(s: &mut String) {
// s is a mutable reference
}
```
```

# Reference
- https://doc.rust-lang.org/rust-by-example/scope/borrow.html
- https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html

0 comments on commit f840bdb

Please sign in to comment.