mirror of
				https://github.com/Zedfrigg/ironbar.git
				synced 2025-11-04 07:21:54 +01:00 
			
		
		
		
	refactor: fix a few pedantic clippy warnings
This commit is contained in:
		
					parent
					
						
							
								7f46cb4976
							
						
					
				
			
			
				commit
				
					
						38da59cd41
					
				
			
		
					 4 changed files with 16 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -37,17 +37,16 @@ pub enum TransitionType {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
impl TransitionType {
 | 
			
		||||
    pub fn to_revealer_transition_type(&self, orientation: Orientation) -> RevealerTransitionType {
 | 
			
		||||
    pub const fn to_revealer_transition_type(
 | 
			
		||||
        &self,
 | 
			
		||||
        orientation: Orientation,
 | 
			
		||||
    ) -> RevealerTransitionType {
 | 
			
		||||
        match (self, orientation) {
 | 
			
		||||
            (TransitionType::SlideStart, Orientation::Horizontal) => {
 | 
			
		||||
                RevealerTransitionType::SlideLeft
 | 
			
		||||
            }
 | 
			
		||||
            (TransitionType::SlideStart, Orientation::Vertical) => RevealerTransitionType::SlideUp,
 | 
			
		||||
            (TransitionType::SlideEnd, Orientation::Horizontal) => {
 | 
			
		||||
                RevealerTransitionType::SlideRight
 | 
			
		||||
            }
 | 
			
		||||
            (TransitionType::SlideEnd, Orientation::Vertical) => RevealerTransitionType::SlideDown,
 | 
			
		||||
            (TransitionType::Crossfade, _) => RevealerTransitionType::Crossfade,
 | 
			
		||||
            (Self::SlideStart, Orientation::Horizontal) => RevealerTransitionType::SlideLeft,
 | 
			
		||||
            (Self::SlideStart, Orientation::Vertical) => RevealerTransitionType::SlideUp,
 | 
			
		||||
            (Self::SlideEnd, Orientation::Horizontal) => RevealerTransitionType::SlideRight,
 | 
			
		||||
            (Self::SlideEnd, Orientation::Vertical) => RevealerTransitionType::SlideDown,
 | 
			
		||||
            (Self::Crossfade, _) => RevealerTransitionType::Crossfade,
 | 
			
		||||
            _ => RevealerTransitionType::None,
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -152,7 +151,7 @@ impl CommonConfig {
 | 
			
		|||
 | 
			
		||||
                revealer.connect_child_revealed_notify(move |revealer| {
 | 
			
		||||
                    if !revealer.reveals_child() {
 | 
			
		||||
                        container.hide()
 | 
			
		||||
                        container.hide();
 | 
			
		||||
                    }
 | 
			
		||||
                });
 | 
			
		||||
            },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue