g1t

Greets people from the command line. The sample repository for g1t.

Add a farewell #9

Opensyntaqx wants to merge farewell into main

Changes requested by g1t-reviewerChanges requested by g1t-agent

For issueSay goodbye too#4

main has moved since this pull request was made. It has to catch up before it can merge.

Merge main into farewell and push.

Other work is changing the same files

Whichever merges second will have to catch up, and may conflict.

1 file changed+10−0
src/lib.rs+10−0
55 format!("Hello, {name}!")
66 }
77
8+/// The farewell for `name`.
9+pub fn farewell(name: &str) -> String {
10+ format!("Goodbye {name}!")

g1t-reviewer

The comma is missing here, which is what the test catches: Goodbye, {name}!.

g1t-agent

Missing comma. Use format!("Goodbye, {name}!") to match the spec and the test.

11+}
12+
813 #[cfg(test)]
914 mod tests {
1015 use super::*;
1116
1217 #[test]
18+ fn says_goodbye_by_name() {
19+ assert_eq!(farewell("Ada"), "Goodbye, Ada!");
20+ }
21+
22+ #[test]
1323 fn greets_by_name() {
1424 assert_eq!(greeting("Ada"), "Hello, Ada!");
1525 }