@@ -6,8 +6,6 @@ use content_inspector::{self, ContentType};
66
77use crate::error::*;
88
9−const THEME_PREVIEW_FILE: &[u8] = include_bytes!("../assets/theme_preview.rs");
10−
119/// A description of an Input source.
1210/// This tells bat how to refer to the input.
1311#[derive(Clone)]
@@ -62,7 +60,6 @@ impl InputDescription {
6260pub(crate) enum InputKind<'a> {
6361 OrdinaryFile(OsString),
6462 StdIn,
65− ThemePreviewFile,
6663 CustomReader(Box<dyn Read + 'a>),
6764}
6865
@@ -73,7 +70,6 @@ impl<'a> InputKind<'a> {
7370 InputDescription::new(path.to_string_lossy()).with_kind(Some("File"))
7471 }
7572 InputKind::StdIn => InputDescription::new("STDIN"),
76− InputKind::ThemePreviewFile => InputDescription::new(""),
7773 InputKind::CustomReader(_) => InputDescription::new("READER"),
7874 }
7975 }
@@ -93,19 +89,9 @@ pub struct Input<'a> {
9389pub(crate) enum OpenedInputKind {
9490 OrdinaryFile(OsString),
9591 StdIn,
96− ThemePreviewFile,
9792 CustomReader,
9893}
9994
100−impl OpenedInputKind {
101− pub(crate) fn is_theme_preview_file(&self) -> bool {
102− match self {
103− OpenedInputKind::ThemePreviewFile => true,
104− _ => false,
105− }
106− }
107−}
108−
10995pub(crate) struct OpenedInput<'a> {
11096 pub(crate) kind: OpenedInputKind,
11197 pub(crate) metadata: InputMetadata,
@@ -130,14 +116,6 @@ impl<'a> Input<'a> {
130116 }
131117 }
132118
133− pub fn theme_preview_file() -> Self {
134− Input {
135− kind: InputKind::ThemePreviewFile,
136− metadata: InputMetadata::default(),
137− description: None,
138− }
139− }
140−
141119 pub fn from_reader(reader: Box<dyn Read + 'a>) -> Self {
142120 Input {
143121 kind: InputKind::CustomReader(reader),
@@ -196,12 +174,6 @@ impl<'a> Input<'a> {
196174 InputReader::new(BufReader::new(file))
197175 },
198176 }),
199− InputKind::ThemePreviewFile => Ok(OpenedInput {
200− kind: OpenedInputKind::ThemePreviewFile,
201− description,
202− metadata: self.metadata,
203− reader: InputReader::new(THEME_PREVIEW_FILE),
204− }),
205177 InputKind::CustomReader(reader) => Ok(OpenedInput {
206178 description,
207179 kind: OpenedInputKind::CustomReader,