Skip to content

Commit

Permalink
fasfsd
Browse files Browse the repository at this point in the history
  • Loading branch information
stnbu committed Nov 12, 2018
1 parent 82b5fbb commit af75f10
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main.rs
Expand Up @@ -45,6 +45,13 @@ fn s_truct() {
//let _o = Mary(1, 1); // oddly does not work //let _o = Mary(1, 1); // oddly does not work
} }


fn e_num() {
enum CumPass {
North, East, West, South,
}
let _enum = CumPass::West;
}

use std::collections::HashMap; use std::collections::HashMap;
fn hmap() { fn hmap() {
let mut book_reviews = HashMap::new(); let mut book_reviews = HashMap::new();
Expand All @@ -57,10 +64,21 @@ fn hmap() {
assert_eq!(x, "foo"); assert_eq!(x, "foo");
} }


fn wat() {
type _Dingus = &'static str;
// what the heck is going on here? I the book says
struct Zoo {
n: _Dingus,
}
let _z = Zoo { n: "foo" };
// In what other context can I use _dingus?
}

fn main() { fn main() {
get_element_n_of_string(); get_element_n_of_string();
misreuse_of_closure(); misreuse_of_closure();
bytes_to_utf8(); bytes_to_utf8();
hmap(); hmap();
s_truct(); s_truct();
e_num();
} }

0 comments on commit af75f10

Please sign in to comment.