Permalink
Browse files

fsdafasd

  • Loading branch information...
stnbu committed Nov 11, 2018
1 parent 8fb73be commit 6495b2f6618f71453d2236749e7d6cca7e1c788d
Showing with 16 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +4 −0 Cargo.toml
  3. +3 −1 README.md
  4. +7 −0 src/main.rs
@@ -0,0 +1,2 @@
target/
Cargo.lock
@@ -0,0 +1,4 @@
[package]
version = "0.0.1"
name = "foo"
authors = ["m@b.com"]
@@ -1,4 +1,6 @@
#Rustafari
# Rustafari
Here I and I I-rate da Rust example.
I am learning Rust. This is a big mish mash of experimentation and compilable nonsense.
@@ -6,6 +6,13 @@ fn get_element_n_of_string() {
println!("{}", chars[0]);
}
fn misreuse_of_closure() {
let example_closure = |x| x;
let _s = example_closure(String::from("hello"));
//let n = example_closure(5); // cannot do this!
}
fn main() {
get_element_n_of_string();
misreuse_of_closure();
}

0 comments on commit 6495b2f

Please sign in to comment.