diff options
Diffstat (limited to 'meap/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 |