@@ -15,7 +15,7 @@ fn main() {
15
15
greet (& [" Alan" ]);
16
16
// output: Hey, there Alan! You seem to be alone.
17
17
greet (& [" Joan" , " Hugh" ]);
18
- // output: Hello, Joan and Hugh. Nice to see you are at least 2!
18
+ // output: Hello, Joan and Hugh. Nice to see you are exactly 2!
19
19
greet (& [" John" , " Peter" , " Stewart" ]);
20
20
// output: Hey everyone, we seem to be 3 here today.
21
21
}
@@ -25,7 +25,7 @@ fn greet(people: &[&str]) {
25
25
[] => println! (" Bummer, there's no one here :(" ),
26
26
[only_one ] => println! (" Hey, there {}! You seem to be alone." , only_one ),
27
27
[first , second ] => println! (
28
- " Hello, {} and {}. Nice to see you are at least 2!" ,
28
+ " Hello, {} and {}. Nice to see you are exactly 2!" ,
29
29
first , second
30
30
),
31
31
_ => println! (" Hey everyone, we seem to be {} here today." , people . len ()),
@@ -88,4 +88,4 @@ error[E0527]: pattern requires 4 elements but array has 3
88
88
[ the tracking issue ] : https://github.com/rust-lang/rust/issues/23121
89
89
90
90
When it comes to slice patterns, more advanced forms are planned but
91
- have not been stabilized yet. To learn more, follow [ the tracking issue] .
91
+ have not been stabilized yet. To learn more, follow [ the tracking issue] .
0 commit comments