Project: The Farmer in the Dell
Write a program that prints the lyrics to the song "The Farmer in the Dell". Use a map to hold each person in the song as the key and the person that they "take" as the value.
See [[The Farmer in the Dell]]
Output
$ rustc FarmerInTheDell1.rs
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:11:2
|
11 | {"farmer", "wife"},
| ^^^^^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
11 | ["farmer", "wife"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:12:2
|
12 | {"wife", "child"},
| ^^^^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
12 | ["wife", "child"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:13:2
|
13 | {"child", "nurse"},
| ^^^^^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
13 | ["child", "nurse"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:14:2
|
14 | {"nurse", "cow"},
| ^^^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
14 | ["nurse", "cow"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:15:2
|
15 | {"cow", "dog"},
| ^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
15 | ["cow", "dog"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:16:2
|
16 | {"dog", "cat"},
| ^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
16 | ["dog", "cat"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:17:2
|
17 | {"cat", "mouse"},
| ^^^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
17 | ["cat", "mouse"],
| ~ ~
error: this is a block expression, not an array
--> FarmerInTheDell1.rs:18:2
|
18 | {"mouse", "cheese"}
| ^^^^^^^^^^^^^^^^^^^
|
help: to make an array, use square brackets instead of curly braces
|
18 | ["mouse", "cheese"]
| ~ ~
error[E0599]: no method named `at` found for struct `HashMap` in the current scope
--> FarmerInTheDell1.rs:31:35
|
31 | let otherPerson:String = people.at(person);
| ^^ method not found in `HashMap<String, String>`
error: aborting due to 9 previous errors
For more information about this error, try `rustc --explain E0599`.