diff options
author | Adam Carpenter <53hornet@gmail.com> | 2019-03-27 15:56:03 -0400 |
---|---|---|
committer | Adam Carpenter <53hornet@gmail.com> | 2019-03-27 15:56:03 -0400 |
commit | d7b64ed3e586e87dab96079f243fd2d36ea647ca (patch) | |
tree | 258eed5ab9fa71c93e060b97ad1808d3ef212d7b | |
parent | e9d1b916708054a354224c6fb9cd85139da47eab (diff) | |
download | learning-rust-d7b64ed3e586e87dab96079f243fd2d36ea647ca.tar.xz learning-rust-d7b64ed3e586e87dab96079f243fd2d36ea647ca.zip |
Started ch3
-rw-r--r-- | meap/ch3/Cargo.lock | 4 | ||||
-rw-r--r-- | meap/ch3/Cargo.toml | 7 | ||||
-rw-r--r-- | meap/ch3/src/main.rs | 19 |
3 files changed, 30 insertions, 0 deletions
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<u8>) { +} + +fn main() { + let mut file1 = File::from("file1.txt"); + open(&mut file1); + //read(file1, vec![]); + close(&mut file1); +} + +// left off at listing 3.1 |