sharkdp/bat · error
The file was lost in the clircle::Identifier, this should no
Error message
The file was lost in the clircle::Identifier, this should not have happened...
What it means
Error "The file was lost in the clircle::Identifier, this should not have happened..." thrown in sharkdp/bat.
Source
Thrown at src/input.rs:236
reader: {
let path_display =
crate::preprocessor::sanitize_for_terminal(&path.to_string_lossy());
let mut file =
File::open(&path).map_err(|e| format!("'{path_display}': {e}"))?;
if file.metadata()?.is_dir() {
return Err(format!("'{path_display}' is a directory.").into());
}
if let Some(stdout) = stdout_identifier {
let input_identifier = Identifier::try_from(file)
.map_err(|e| format!("{path_display}: Error identifying file: {e}"))?;
if stdout.surely_conflicts_with(&input_identifier) {
return Err(format!(
"IO circle detected. The input from '{path_display}' is also an output. Aborting to avoid infinite loop.",
)
.into());
}
file = input_identifier.into_inner().expect("The file was lost in the clircle::Identifier, this should not have happened...");
}
InputReader::try_new(BufReader::new(file))?
},
}),
InputKind::CustomReader(reader) => Ok(OpenedInput {
description,
kind: OpenedInputKind::CustomReader,
metadata: self.metadata,
reader: InputReader::try_new(BufReader::new(reader))?,
}),
}
}
}
pub(crate) struct InputReader<'a> {
inner: Box<dyn BufRead + 'a>,
pub(crate) first_line: Vec<u8>,View on GitHub (pinned to b671e53c2c)
When it happens
Trigger: Thrown at src/input.rs:236 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sharkdp/bat@b671e53c2c (2026-08-16).
Data as JSON: /api/errors/6122e3833e795528.
Report an issue: GitHub.