mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 00:51:56 +00:00 
			
		
		
		
	Fix clippy suggestion: .or_else(|| Some(…)) => .or(Some(…))
This commit is contained in:
		@@ -2,7 +2,7 @@ use bat::input::Input;
 | 
				
			|||||||
use std::ffi::OsStr;
 | 
					use std::ffi::OsStr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pub fn new_file_input<'a>(file: &'a OsStr, name: Option<&'a OsStr>) -> Input<'a> {
 | 
					pub fn new_file_input<'a>(file: &'a OsStr, name: Option<&'a OsStr>) -> Input<'a> {
 | 
				
			||||||
    named(Input::ordinary_file(file), name.or_else(|| Some(file)))
 | 
					    named(Input::ordinary_file(file), name.or(Some(file)))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pub fn new_stdin_input(name: Option<&OsStr>) -> Input {
 | 
					pub fn new_stdin_input(name: Option<&OsStr>) -> Input {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user