Remove unused variant from FormatterError

This seems to be a relic from the change which added external formatting
commands - initially it worked by writing the file in place and
reloading it. Now this error type is not possible and can be removed.
This commit is contained in:
Michael Davis 2025-01-17 11:00:37 -05:00
parent 69068770c8
commit 343397391f
No known key found for this signature in database

View File

@ -2198,7 +2198,6 @@ pub enum FormatterError {
BrokenStdin,
WaitForOutputFailed,
InvalidUtf8Output,
DiskReloadError(String),
NonZeroExitStatus(Option<String>),
}
@ -2213,7 +2212,6 @@ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Self::BrokenStdin => write!(f, "Could not write to formatter stdin"),
Self::WaitForOutputFailed => write!(f, "Waiting for formatter output failed"),
Self::InvalidUtf8Output => write!(f, "Invalid UTF-8 formatter output"),
Self::DiskReloadError(error) => write!(f, "Error reloading file from disk: {}", error),
Self::NonZeroExitStatus(Some(output)) => write!(f, "Formatter error: {}", output),
Self::NonZeroExitStatus(None) => {
write!(f, "Formatter exited with non zero exit status")