MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / fmt

Method fmt

ch_04/final/src/main.rs:74–80  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter)

Source from the content-addressed store, hash-verified

72
73impl std::fmt::Display for Error {
74 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
75 match self {
76 Error::ParseError(err) => write!(f, "Cannot parse parameter: {}", err),
77 Error::MissingParameters => write!(f, "Missing parameter"),
78 Error::QuestionNotFound => write!(f, "Question not found"),
79 }
80 }
81}
82
83impl Reject for Error {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected