1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-03 18:51:44 +00:00

Run 'cargo fmt'

This commit is contained in:
sharkdp
2020-02-28 10:27:06 +01:00
parent 4ac3161c19
commit ca066bf7cd
6 changed files with 19 additions and 11 deletions
+3 -2
View File
@@ -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());