From 67cdcc2e12118becb823e20a40cc2687f2b8425a Mon Sep 17 00:00:00 2001 From: Adam Carpenter <53hornet@gmail.com> Date: Wed, 27 Mar 2019 15:32:37 -0400 Subject: Started Rust in Action MEAP. --- structs/src/main.rs.bak | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 structs/src/main.rs.bak (limited to 'structs/src/main.rs.bak') diff --git a/structs/src/main.rs.bak b/structs/src/main.rs.bak deleted file mode 100755 index 361b225..0000000 --- a/structs/src/main.rs.bak +++ /dev/null @@ -1,36 +0,0 @@ -struct User { - username: String, - email: String, - sign_in_count: u64, - active: bool, -} - -fn main() { -// let mut user1 = User { -// email: String::from("test@tester.net"), -// username: String::from("testytester"), -// active: true, -// sign_in_count: 999, -// }; -// let user1 = build_user(String::from("dennis.nedry@adp.com"), String::from("nedryland")); -// let user2 = User { -// email: String::from("john.hammond@adp.com"), -// username: String::from("spare_no_expense"), -// ..user1 -// }; -// println!("{} {} {} {}", user2.email, user2.username, user2.active, user2.sign_in_count); - - struct Color(u32, u32, u32); - struct Point(i32, i32, i32); - let black = Color(0, 0, 0); - let origin = Point(0, -1, 0); -} - -fn build_user(email: String, username: String) -> User { - User { - email, - username, - active: true, - sign_in_count: 1, - } -} -- cgit v1.2.3