From f28994d593c27092db7db9c7fc4c9c6c94ae1dc8 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Tue, 7 Mar 2023 11:19:55 +0100 Subject: [PATCH 01/16] Fix spelling of data structure --- slides/A1-intro-to-rust.md | 2 +- slides/A2-advanced-intro.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/slides/A1-intro-to-rust.md b/slides/A1-intro-to-rust.md index 941cb584..ab4c3a44 100644 --- a/slides/A1-intro-to-rust.md +++ b/slides/A1-intro-to-rust.md @@ -733,7 +733,7 @@ we need them somewhere else - We don't want to pass a copy all the time - Large data that we do not want to copy - Modifying original data -- What about datastructures with a variable size? +- What about data structures with a variable size? ::right:: diff --git a/slides/A2-advanced-intro.md b/slides/A2-advanced-intro.md index 9e480e04..a9931a11 100644 --- a/slides/A2-advanced-intro.md +++ b/slides/A2-advanced-intro.md @@ -537,7 +537,7 @@ struct PointFloat(f64, f64); struct PointInt(i64, i64); ``` -We are repeating ourselves here, what if we could write a datastructure for +We are repeating ourselves here, what if we could write a data structure for both of these cases? @@ -1026,7 +1026,7 @@ There are several reasons to box a variable on the heap * When something is too large to move around * We need something that is sized dynamically -* For writing recursive datastructures +* For writing recursive data structures ```rust struct Node { @@ -1042,7 +1042,7 @@ There are several reasons to box a variable on the heap * When something is too large to move around * We need something that is sized dynamically -* For writing recursive datastructures +* For writing recursive data structures ```rust struct Node { @@ -1102,7 +1102,7 @@ to support summing up only parts of a vector? * Contiguous: elements are layed out in memory such that they are evenly spaced * Dynamically sized: the size of the slice is not stored in the type, but is determined at runtime -* View: a slice is never an owned datastructure +* View: a slice is never an owned data structure * Slices are typed as `[T]`, where `T` is the type of the elements in the slice --- @@ -1142,7 +1142,7 @@ help: function arguments must have a statically known size, borrowed types alway From bcd59458c49e2e28e76a1b86b309d5468a39f386 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Tue, 7 Mar 2023 15:41:59 +0100 Subject: [PATCH 02/16] Rust with capital R, also in notes --- slides/A1-intro-to-rust.md | 6 +++--- slides/A2-advanced-intro.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slides/A1-intro-to-rust.md b/slides/A1-intro-to-rust.md index ab4c3a44..4f33ed19 100644 --- a/slides/A1-intro-to-rust.md +++ b/slides/A1-intro-to-rust.md @@ -216,7 +216,7 @@ error: could not compile `hello-world` due to previous error @@ -431,7 +431,7 @@ fn main() { --- diff --git a/slides/A2-advanced-intro.md b/slides/A2-advanced-intro.md index a9931a11..bfd75aed 100644 --- a/slides/A2-advanced-intro.md +++ b/slides/A2-advanced-intro.md @@ -22,7 +22,7 @@ Advanced Rust syntax # Ownership We previously talked about ownership -* In rust there is always a single owner for each stack value +* In Rust there is always a single owner for each stack value * Once the owner goes out of scope any associated values should be cleaned up * Copy types creates copies, all other types are *moved* @@ -63,7 +63,7 @@ fn calculate_length(s: String) -> usize { borrow it from them, but eventually you have to give it back - If a value is borrowed, it is not moved and the ownership stays with the original owner -- To borrow in rust, we create a *reference* +- To borrow in Rust, we create a *reference* ```rust {all|3|7|all} fn main() { From 22452f18924a418207610699687beaddc661e437 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Tue, 7 Mar 2023 16:30:27 +0100 Subject: [PATCH 03/16] Fix n-bit spelling for floats and integers --- slides/A1-intro-to-rust.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slides/A1-intro-to-rust.md b/slides/A1-intro-to-rust.md index 4f33ed19..20df39e3 100644 --- a/slides/A1-intro-to-rust.md +++ b/slides/A1-intro-to-rust.md @@ -324,8 +324,8 @@ fn main() { } ``` -- `f32`: single precision (32 bit) floating point number -- `f64`: double precision (64 bit) floating point number +- `f32`: single precision (32-bit) floating point number +- `f64`: double precision (64-bit) floating point number