File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,20 @@ fn main() {
6767    for name in names.iter() { 
6868        match name { 
6969            &"Ferris" => println!("There is a rustacean among us!"), 
70+             // TODO ^ Try deleting the & and matching just "Ferris" 
7071            _ => println!("Hello {}", name), 
7172        } 
7273    } 
74+      
75+     println!("names: {:?}", names); 
7376} 
7477``` 
7578
7679*  ` into_iter `  - This consumes the collection so that on each iteration the exact
7780  data is provided. Once the collection has been consumed it is no longer
7881  available for reuse as it has been 'moved' within the loop.
7982
80- ``` rust,  editable
83+ ``` rust,  editable, ignore 
8184fn main() { 
8285    let names = vec!["Bob", "Frank", "Ferris"]; 
8386
@@ -87,6 +90,9 @@ fn main() {
8790            _ => println!("Hello {}", name), 
8891        } 
8992    } 
93+      
94+     println!("names: {:?}", names); 
95+     // FIXME ^ Comment out this line 
9096} 
9197``` 
9298
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments