[board] Clean up variables names in piece_sets.rs so creating an error is a little more succinct
This commit is contained in:
		
							parent
							
								
									c7be0e3e2b
								
							
						
					
					
						commit
						67448b44d7
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -92,11 +92,8 @@ impl PieceSet {
 | 
			
		|||
        strategy: PlacePieceStrategy,
 | 
			
		||||
    ) -> Result<(), PlacePieceError> {
 | 
			
		||||
        if strategy == PlacePieceStrategy::PreserveExisting {
 | 
			
		||||
            if let Some(existing_piece) = self.mailbox.get(square) {
 | 
			
		||||
                return Err(PlacePieceError::ExisitingPiece(PlacedPiece::new(
 | 
			
		||||
                    existing_piece,
 | 
			
		||||
                    square,
 | 
			
		||||
                )));
 | 
			
		||||
            if let Some(piece) = self.mailbox.get(square) {
 | 
			
		||||
                return Err(PlacePieceError::ExisitingPiece { piece, square });
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue