From d7b64ed3e586e87dab96079f243fd2d36ea647ca Mon Sep 17 00:00:00 2001 From: Adam Carpenter <53hornet@gmail.com> Date: Wed, 27 Mar 2019 15:56:03 -0400 Subject: Started ch3 --- meap/ch3/Cargo.lock | 4 ++++ meap/ch3/Cargo.toml | 7 +++++++ meap/ch3/src/main.rs | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 meap/ch3/Cargo.lock create mode 100644 meap/ch3/Cargo.toml create mode 100644 meap/ch3/src/main.rs diff --git a/meap/ch3/Cargo.lock b/meap/ch3/Cargo.lock new file mode 100644 index 0000000..8aeab89 --- /dev/null +++ b/meap/ch3/Cargo.lock @@ -0,0 +1,4 @@ +[[package]] +name = "ch3" +version = "0.1.0" + diff --git a/meap/ch3/Cargo.toml b/meap/ch3/Cargo.toml new file mode 100644 index 0000000..2552fbc --- /dev/null +++ b/meap/ch3/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "ch3" +version = "0.1.0" +authors = ["Adam Carpenter <53hornet@gmail.com>"] +edition = "2018" + +[dependencies] diff --git a/meap/ch3/src/main.rs b/meap/ch3/src/main.rs new file mode 100644 index 0000000..b75e506 --- /dev/null +++ b/meap/ch3/src/main.rs @@ -0,0 +1,19 @@ +type File = String; + +fn open(f: &mut File) { +} + +fn close(f: &mut File) { +} + +fn read(f: &mut File, save_to: &mut Vec) { +} + +fn main() { + let mut file1 = File::from("file1.txt"); + open(&mut file1); + //read(file1, vec![]); + close(&mut file1); +} + +// left off at listing 3.1 -- cgit v1.2.3