summaryrefslogtreecommitdiff
path: root/advanced/adv-types
diff options
context:
space:
mode:
Diffstat (limited to 'advanced/adv-types')
-rw-r--r--advanced/adv-types/Cargo.lock4
-rw-r--r--advanced/adv-types/Cargo.toml7
-rw-r--r--advanced/adv-types/src/main.rs41
3 files changed, 52 insertions, 0 deletions
diff --git a/advanced/adv-types/Cargo.lock b/advanced/adv-types/Cargo.lock
new file mode 100644
index 0000000..a7ad78b
--- /dev/null
+++ b/advanced/adv-types/Cargo.lock
@@ -0,0 +1,4 @@
+[[package]]
+name = "adv-types"
+version = "0.1.0"
+
diff --git a/advanced/adv-types/Cargo.toml b/advanced/adv-types/Cargo.toml
new file mode 100644
index 0000000..a3ca211
--- /dev/null
+++ b/advanced/adv-types/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "adv-types"
+version = "0.1.0"
+authors = ["Adam Carpenter <53hornet@gmail.com>"]
+edition = "2018"
+
+[dependencies]
diff --git a/advanced/adv-types/src/main.rs b/advanced/adv-types/src/main.rs
new file mode 100644
index 0000000..60d42b2
--- /dev/null
+++ b/advanced/adv-types/src/main.rs
@@ -0,0 +1,41 @@
+//use std::io::Error;
+//use std::fmt;
+
+//pub trait Write {
+//
+// fn write(&mut self, buf: &[u8]) -> Result<usize>;
+// fn flush(&mut self) -> Result<(), Error>;
+//
+// fn write_all(&mut self, buf: &[u8]) -> Result<()>;
+// fn write_fmt(&mut self, fmt: fmt::Arguments) -> Result<()>;
+//}
+
+//fn main() {
+// type Miles = i32;
+//
+// let x: i32 = 5;
+// let y: Miles = 5;
+//
+// println!("x + y = {}", x + y);
+
+
+//}
+
+//type Thunk = Box<dyn Fn() + Send + 'static>;
+//
+//let f: Thunk = Box::new(|| println!("hi"));
+//
+//fn takes_long_type(f: Thunk) {
+//}
+//
+//fn returns_long_type() -> Thunk {
+//}
+
+fn main() {
+ print!("forever");
+
+ loop {
+ print!("and ever ");
+ }
+}
+