Better panic message.
This commit is contained in:
		
					parent
					
						
							
								0d7097dbf8
							
						
					
				
			
			
				commit
				
					
						a490b2a72f
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -40,7 +40,10 @@ impl From<char> for Play { | ||||||
|             'X' => Play::Rock, |             'X' => Play::Rock, | ||||||
|             'Y' => Play::Paper, |             'Y' => Play::Paper, | ||||||
|             'Z' => Play::Scissors, |             'Z' => Play::Scissors, | ||||||
|             _ => panic!("Only A, B, C, X, Y or Z letters are available."), |             other => panic!( | ||||||
|  |                 "Only A, B, C, X, Y or Z letters are available. Had {}", | ||||||
|  |                 other | ||||||
|  |             ), | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue