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

Method fmt

ch_05/handle-errors/src/lib.rs:16–22  ·  view source on GitHub ↗
(&self, f: &mut std::fmt::Formatter)

Source from the content-addressed store, hash-verified

14
15impl std::fmt::Display for Error {
16 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
17 match self {
18 Error::ParseError(err) => write!(f, "Cannot parse parameter: {}", err),
19 Error::MissingParameters => write!(f, "Missing parameter"),
20 Error::QuestionNotFound => write!(f, "Question not found"),
21 }
22 }
23}
24
25impl Reject for Error {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected