Use .flatten() instead of .filter_map(|x| x), clippy warning
https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity
This commit is contained in:
		
							parent
							
								
									5f873ae500
								
							
						
					
					
						commit
						e37680af96
					
				@ -870,7 +870,7 @@ impl<Ctx: ScriptContext> ExtractPolicy for Miniscript<DescriptorPublicKey, Ctx>
 | 
				
			|||||||
                    .map(|n| n.extract_policy(signers, secp))
 | 
					                    .map(|n| n.extract_policy(signers, secp))
 | 
				
			||||||
                    .collect::<Result<Vec<_>, _>>()?
 | 
					                    .collect::<Result<Vec<_>, _>>()?
 | 
				
			||||||
                    .into_iter()
 | 
					                    .into_iter()
 | 
				
			||||||
                    .filter_map(|x| x)
 | 
					                    .flatten()
 | 
				
			||||||
                    .collect();
 | 
					                    .collect();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if mapped.len() < nodes.len() {
 | 
					                if mapped.len() < nodes.len() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user