MCPcopy Create free account
hub / github.com/csskit/csskit / fmt

Method fmt

crates/csskit/src/errors.rs:32–43  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

30
31impl std::fmt::Debug for CliError {
32 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33 match self {
34 Self::ParseFailed => write!(f, "Parsing Failed!"),
35 Self::FilesAndStdin => {
36 write!(f, "Specified multiple files including stdin. Try passing just files, or use `-` for stdin.")
37 }
38 Self::Checks(i) => f.write_str(&format!("{i} files failed check!")),
39 Self::Io(arg0) => f.debug_tuple("::io::Error").field(arg0).finish(),
40 Self::Fmt(arg0) => f.debug_tuple("::fmt::Error").field(arg0).finish(),
41 Self::SerdeJson(arg0) => f.debug_tuple("::serde_json::Error").field(arg0).finish(),
42 }
43 }
44}
45
46impl From<CliError> for ExitCode {

Callers

nothing calls this directly

Calls 2

write_strMethod · 0.80
finishMethod · 0.80

Tested by

no test coverage detected