finish ch4.2

This commit is contained in:
Rowan Torbitzky-Lane 2025-03-20 13:49:55 -05:00
parent 2a696fdfa9
commit 84a954a0ca

View File

@ -100,8 +100,13 @@ fn main() {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Data must outlive all of its references // Data must outlive all of its references
// Ended at: // -----------------------------------------------------------------------------
// https://rust-book.cs.brown.edu/ch04-02-references-and-borrowing.html#summary // Summary
// References provide ability to read/write data with consuming ownership.
// References created with borrows (& and &mut) used dereferenced with * (often implictly)
// Off to fixing ownership issues in ch4.3
} }
fn greet(g1: String, g2: String) { fn greet(g1: String, g2: String) {