Skip to content

Commit 6527f36

Browse files
author
Tim McNamara
committed
Incorporate MEAPv12 changes
1 parent 5d0a8c3 commit 6527f36

File tree

115 files changed

+16443
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+16443
-62
lines changed

ch1/ch1-cereals/Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch1/ch1-cereals/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "ch1-cereals"
3+
version = "0.1.0"
4+
authors = ["Tim McNamara <[email protected]>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]

ch1/ch1-cereals/src/main.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#[derive(Debug)]
2+
enum Cereal {
3+
Barley, Millet, Rice,
4+
Rye, Spelt, Wheat,
5+
}
6+
7+
fn main() {
8+
let mut grains: Vec<Cereal> = vec![];
9+
grains.push(Cereal::Rye);
10+
drop(grains);
11+
12+
println!("{:?}", grains);
13+
}

ch1/ch1-fruit/Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch1/ch1-fruit/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "ch1-fruit"
3+
version = "0.1.0"
4+
authors = ["Tim McNamara <[email protected]>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]

ch1/ch1-fruit/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
let fruit = vec!['🥝', '🍌', '🍇'];
3+
let buffer_overflow = fruit[4]; // <1>
4+
assert_eq!(buffer_overflow, '🍉') // <2>
5+
}

ch1/ch1-letters/Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch1/ch1-letters/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "ch1-letters"
3+
version = "0.1.0"
4+
authors = ["Tim McNamara <[email protected]>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]

ch1/ch1-letters/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
fn main() {
2+
let mut letters = vec![
3+
"a", "b", "b"
4+
];
5+
6+
for letter in letters {
7+
println!("{}", letter);
8+
letters.push(letter.clone());
9+
}
10+
}

ch1/ch1-penguins/Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)