1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 19:32:25 +01:00

Revert "Add io cycle detection with clircle"

This reverts commit aa2ae19dfd.
This commit is contained in:
sharkdp
2020-11-24 21:01:14 +01:00
committed by David Peter
parent 591eba66a3
commit a6810e3353
4 changed files with 10 additions and 63 deletions

View File

@@ -1,8 +1,6 @@
use std::convert::TryFrom;
use std::ffi::{OsStr, OsString};
use std::fs::File;
use std::io::{self, BufRead, BufReader, Read};
use std::path::Path;
use content_inspector::{self, ContentType};
@@ -193,18 +191,6 @@ impl<'a> Input<'a> {
}
}
impl TryFrom<&'_ Input<'_>> for clircle::Identifier {
type Error = ();
fn try_from(input: &Input) -> std::result::Result<clircle::Identifier, ()> {
match input.kind {
InputKind::OrdinaryFile(ref path) => Self::try_from(Path::new(path)).map_err(|_| ()),
InputKind::StdIn => Self::try_from(clircle::Stdio::Stdin).map_err(|_| ()),
InputKind::CustomReader(_) => Err(()),
}
}
}
pub(crate) struct InputReader<'a> {
inner: Box<dyn BufRead + 'a>,
pub(crate) first_line: Vec<u8>,