From 5b67dd529bf520dc9caf9d49e892b9714a6cfbd4 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Sun, 25 Aug 2024 17:53:04 +0000 Subject: [PATCH] Update Examples --- Examples.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Examples.md b/Examples.md index 864a004..30a634d 100644 --- a/Examples.md +++ b/Examples.md @@ -926,7 +926,7 @@ fn main() { for name in names.iter() { match name { - &"Ferris" => println!("There is a rustacean among us!"), + &"Ferris" => println!("Rustacean alert!"), _ => println!("Hello {}", name), } } @@ -935,7 +935,7 @@ fn main() { for name in names.iter_mut() { *name = match name { - &mut "Ferris" => "There is a rustacean among us!", + &mut "Ferris" => "Rustacean alert!", _ => "Hello", } } @@ -960,7 +960,7 @@ fn main for name from names match name - &"Ferris" => println! "There is a rustacean among us!" + &"Ferris" => println! "Rustacean alert!" _ => println! "Hello {}", name println!("names: {:?}", names); @@ -969,7 +969,7 @@ fn main for name on names *name = match name - &mut "Ferris" => "There is a rustacean among us!" + &mut "Ferris" => "Rustacean alert!" _ => "Hello" println!("names: {:?}", names); @@ -985,6 +985,5 @@ fn main // println!("names: {:?}", names); // compile error - ``` \ No newline at end of file