Skip to content

Commit 47696fe

Browse files
committed
add iterators project
1 parent 182371d commit 47696fe

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/target
2+
3+
.cargo/

Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[workspace]
2-
members = ["./ownership-and-borrowing", "options-and-results", "errors"]
2+
members = ["./ownership-and-borrowing", "options-and-results", "errors", "iterators"]

iterators/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "iterators"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]

iterators/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fn main() {
2+
let v = [1, 2, 3];
3+
for i in 0..v.len() {
4+
println!("{}", v[i]);
5+
}
6+
println!("Hello, iterators!");
7+
}

0 commit comments

Comments
 (0)