MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / fmt

Method fmt

0a_error_handling/rust/more_boilerplate.rs:16–23  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

14
15impl fmt::Display for DoubleError {
16 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
17 match *self {
18 DoubleError::EmptyVec =>
19 write!(f, "please use a vector with at least one element"),
20 // This is a wrapper, so defer to the underlying types' implementation of `fmt`.
21 DoubleError::Parse(ref e) => e.fmt(f),
22 }
23 }
24}
25
26impl error::Error for DoubleError {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected