first commit

This commit is contained in:
2026-01-08 07:12:58 +00:00
commit 53a54ddf90
218 changed files with 4444 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
// Lifetimes are also needed when structs hold references.
// TODO: Fix the compiler errors about the struct.
struct Book {
author: &str,
title: &str,
}
fn main() {
let book = Book {
author: "George Orwell",
title: "1984",
};
println!("{} by {}", book.title, book.author);
}