summaryrefslogtreecommitdiff
path: root/.trash
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-08-21 22:09:29 +0200
committerJasper Ras <jras@hostnet.nl>2025-08-21 22:09:29 +0200
commit27514d58573ce1f844af4ea60afa72c7f58f1cd7 (patch)
tree4b16c31f73cb72435d03d5e105261143f8ca135f /.trash
parent22675cd8dc75d8b8d4b0f818f5b093efbc364802 (diff)
vault backup: 2025-08-21 22:09:29HEADmain
Diffstat (limited to '.trash')
-rw-r--r--.trash/How to return from a function.md5
-rw-r--r--.trash/Unlike integers floats do not have an architecture dependent size.md5
-rw-r--r--.trash/Untitled 1.md0
-rw-r--r--.trash/Untitled 2 2.md0
-rw-r--r--.trash/Using if let or let else matching.md3
5 files changed, 13 insertions, 0 deletions
diff --git a/.trash/How to return from a function.md b/.trash/How to return from a function.md
new file mode 100644
index 0000000..095cea0
--- /dev/null
+++ b/.trash/How to return from a function.md
@@ -0,0 +1,5 @@
+[[Adding a semicolon to the end of a line turns it into a statement]]
+
+In Rust we can return from a function with simply an expression at the end of the scope.
+
+The `return` keyword is mostly used for returning early. \ No newline at end of file
diff --git a/.trash/Unlike integers floats do not have an architecture dependent size.md b/.trash/Unlike integers floats do not have an architecture dependent size.md
new file mode 100644
index 0000000..f6b962f
--- /dev/null
+++ b/.trash/Unlike integers floats do not have an architecture dependent size.md
@@ -0,0 +1,5 @@
+[[Rust]]
+
+Integers come in many sizes with the smallest being 8-bit and the largest 128-bit. However there is also `usize or isize` which specifies that the size is dependent on the CPU architecture.
+
+In contrast, floating points only have two sizes: f32 and f64. There is no fsize. \ No newline at end of file
diff --git a/.trash/Untitled 1.md b/.trash/Untitled 1.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.trash/Untitled 1.md
diff --git a/.trash/Untitled 2 2.md b/.trash/Untitled 2 2.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.trash/Untitled 2 2.md
diff --git a/.trash/Using if let or let else matching.md b/.trash/Using if let or let else matching.md
new file mode 100644
index 0000000..48d0bd2
--- /dev/null
+++ b/.trash/Using if let or let else matching.md
@@ -0,0 +1,3 @@
+We can use `if let` if we have a match expression with just one pattern/arm that we care about.
+```rust
+```