projects
/
ohcount
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #41 from blackducksw/ubuntu_14
[ohcount]
/
test
/
detect_files
/
rust.rs
1
/*
2
* This is the example given by www.rust-lang.org
3
*/
4
// Line comments work too
5
fn main() {
6
let nums = [1, 2];
7
let noms = ["Tim", "Eston", "Aaron", "Ben"];
8
9
let mut odds = nums.iter().map(|&x| x * 2 - 1);
10
11
for num in odds {
12
do spawn {
13
println!("{:s} says hello from a lightweight thread!", noms[num]);
14
}
15
}
16
}