Skip to content

Commit

Permalink
feat: hash-map init
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Klingenberg <[email protected]>
  • Loading branch information
fredrkl committed Mar 27, 2024
1 parent 618e40d commit 473ea5c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[workspace]

workspace.resolver = "2"

members = [
"projects/backyard",
"projects/collections",
Expand All @@ -12,4 +14,5 @@ members = [
"projects/rectangles",
"projects/structs",
"projects/restaurant",
"projects/hash-map",
]
8 changes: 8 additions & 0 deletions projects/hash-map/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "hash-map"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
8 changes: 8 additions & 0 deletions projects/hash-map/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use std::collections::HashMap;

fn main() {
println!("Hello, world!");
let mut scores = HashMap::new();
scores.insert(String::from("Blue"), 10);
scores.insert(String::from("Yellow"), 50);
}

0 comments on commit 473ea5c

Please sign in to comment.