File tree 4 files changed +5
-2
lines changed 4 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " bob"
3
- version = " 1.0 .0"
3
+ version = " 1.1 .0"
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ Bob answers 'Sure.' if you ask him a question.
6
6
7
7
He answers 'Whoa, chill out!' if you yell at him.
8
8
9
+ He answers 'Calm down, I know what I'm doing!' if you yell a question at him.
10
+
9
11
He says 'Fine. Be that way!' if you address him without actually saying
10
12
anything.
11
13
Original file line number Diff line number Diff line change 1
1
pub fn reply ( message : & str ) -> & str {
2
2
if is_silence ( message) { "Fine. Be that way!" }
3
+ else if is_yelling ( message) && is_question ( message) { "Calm down, I know what I'm doing!" }
3
4
else if is_yelling ( message) { "Whoa, chill out!" }
4
5
else if is_question ( message) { "Sure." }
5
6
else { "Whatever." }
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ fn test_using_acronyms_in_regular_speech() {
52
52
#[ test]
53
53
#[ ignore]
54
54
fn test_forceful_question ( ) {
55
- assert_eq ! ( "Whoa, chill out !" ,
55
+ assert_eq ! ( "Calm down, I know what I'm doing !" ,
56
56
bob:: reply( "WHAT THE HELL WERE YOU THINKING?" ) ) ;
57
57
}
58
58
You can’t perform that action at this time.
0 commit comments