@@ -15,7 +15,7 @@ fn main() {
1515 greet (& [" Alan" ]);
1616 // output: Hey, there Alan! You seem to be alone.
1717 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!
1919 greet (& [" John" , " Peter" , " Stewart" ]);
2020 // output: Hey everyone, we seem to be 3 here today.
2121}
@@ -25,7 +25,7 @@ fn greet(people: &[&str]) {
2525 [] => println! (" Bummer, there's no one here :(" ),
2626 [only_one ] => println! (" Hey, there {}! You seem to be alone." , only_one ),
2727 [first , second ] => println! (
28- " Hello, {} and {}. Nice to see you are at least 2!" ,
28+ " Hello, {} and {}. Nice to see you are exactly 2!" ,
2929 first , second
3030 ),
3131 _ => 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
8888[ the tracking issue ] : https://github.com/rust-lang/rust/issues/23121
8989
9090When 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