Skip to content

Commit 7d7955e

Browse files
committed
First edition released!
1 parent e23c70e commit 7d7955e

File tree

408 files changed

+110292
-1313637
lines changed

Some content is hidden

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

408 files changed

+110292
-1313637
lines changed

β€Žch1/ch1-animals-specialization.rs

Lines changed: 0 additions & 47 deletions
This file was deleted.

β€Žch1/ch1-animals-tuple-structs.rs

Lines changed: 0 additions & 41 deletions
This file was deleted.

β€Žch1/ch1-animals.rs

Lines changed: 0 additions & 41 deletions
This file was deleted.

β€Žch1/ch1-cereals/src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#[derive(Debug)]
2-
enum Cereal {
1+
#[derive(Debug)] // <1>
2+
enum Cereal { // <2>
33
Barley, Millet, Rice,
44
Rye, Spelt, Wheat,
55
}
66

77
fn main() {
8-
let mut grains: Vec<Cereal> = vec![];
9-
grains.push(Cereal::Rye);
10-
drop(grains);
11-
12-
println!("{:?}", grains);
13-
}
8+
let mut grains: Vec<Cereal> = vec![]; // <3>
9+
grains.push(Cereal::Rye); // <4>
10+
drop(grains); // <5>
11+
12+
println!("{:?}", grains); // <6>
13+
}

β€Žch1/ch1-escape-html.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

β€Žch1/ch1-fruit/src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
fn main() {
22
let fruit = vec!['πŸ₯', '🍌', 'πŸ‡'];
3-
let buffer_overflow = fruit[4]; // <1>
4-
assert_eq!(buffer_overflow, 'πŸ‰') // <2>
5-
}
3+
4+
let buffer_overflow = fruit[4]; // <1>
5+
6+
assert_eq!(buffer_overflow, 'πŸ‰') // <2>
7+
}

β€Žch1/ch1-hashmap-hashset.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

β€Žch1/ch1-hello2.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

β€Žch10/untitled/Cargo.lock renamed to β€Žch1/ch1-hello2/Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žch1/ch1-hello2/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "hello2"
3+
version = "0.1.0"
4+
authors = ["Tim McNamara <[email protected]>"]
5+
edition = "2018"
6+
7+
[dependencies]

0 commit comments

Comments
Β (0)