mirror of
https://github.com/sharkdp/bat
synced 2026-08-03 18:51:44 +00:00
Run 'cargo fmt'
This commit is contained in:
+3
-2
@@ -1,6 +1,6 @@
|
||||
use std::ffi::OsStr;
|
||||
use std::fs::File;
|
||||
use std::io::{self, BufRead, BufReader};
|
||||
use std::ffi::OsStr;
|
||||
|
||||
use content_inspector::{self, ContentType};
|
||||
|
||||
@@ -64,7 +64,8 @@ impl<'a> InputFile<'a> {
|
||||
match self {
|
||||
InputFile::StdIn => Ok(InputFileReader::new(stdin.lock())),
|
||||
InputFile::Ordinary(filename) => {
|
||||
let file = File::open(filename).map_err(|e| format!("'{}': {}", filename.to_string_lossy(), e))?;
|
||||
let file = File::open(filename)
|
||||
.map_err(|e| format!("'{}': {}", filename.to_string_lossy(), e))?;
|
||||
|
||||
if file.metadata()?.is_dir() {
|
||||
return Err(format!("'{}' is a directory.", filename.to_string_lossy()).into());
|
||||
|
||||
Reference in New Issue
Block a user