mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 09:01:56 +00:00 
			
		
		
		
	Use the functional update syntax
This commit is contained in:
		
				
					committed by
					
						
						David Peter
					
				
			
			
				
	
			
			
			
						parent
						
							a27814db8e
						
					
				
				
					commit
					425a0f90e9
				
			@@ -447,8 +447,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
 | 
			
		||||
 | 
			
		||||
                if text.len() != text_trimmed.len() {
 | 
			
		||||
                    if let Some(background_color) = background_color {
 | 
			
		||||
                        let mut ansi_style = Style::default();
 | 
			
		||||
                        ansi_style.background = to_ansi_color(background_color, true_color);
 | 
			
		||||
                        let ansi_style = Style {
 | 
			
		||||
                            background: to_ansi_color(background_color, true_color),
 | 
			
		||||
                            ..Default::default()
 | 
			
		||||
                        };
 | 
			
		||||
                        let width = if cursor_total <= cursor_max {
 | 
			
		||||
                            cursor_max - cursor_total + 1
 | 
			
		||||
                        } else {
 | 
			
		||||
@@ -588,8 +590,10 @@ impl<'a> Printer for InteractivePrinter<'a> {
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if let Some(background_color) = background_color {
 | 
			
		||||
                let mut ansi_style = Style::default();
 | 
			
		||||
                ansi_style.background = to_ansi_color(background_color, self.config.true_color);
 | 
			
		||||
                let ansi_style = Style {
 | 
			
		||||
                    background: to_ansi_color(background_color, self.config.true_color),
 | 
			
		||||
                    ..Default::default()
 | 
			
		||||
                };
 | 
			
		||||
 | 
			
		||||
                write!(
 | 
			
		||||
                    handle,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user