You've already forked comprehensive-rust
							
							
				mirror of
				https://github.com/google/comprehensive-rust.git
				synced 2025-10-31 08:37:45 +02:00 
			
		
		
		
	Remove unnecessary ref mut in binary tree exercise (#1586)
There's no need for the `ref mut` in the pattern. So, let's just drop it for the sake of simplicity.
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							ce081b12f9
						
					
				
				
					commit
					f37aeac3ca
				
			| @@ -42,7 +42,7 @@ impl<T: Ord + Copy> BinaryTree<T> { | ||||
|                     right: BinaryTree::new(), | ||||
|                 })); | ||||
|             } | ||||
|             Some(ref mut n) => { | ||||
|             Some(n) => { | ||||
|                 if value < n.value { | ||||
|                     n.left.insert(value); | ||||
|                 } else if value > n.value { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user