MCPcopy Index your code
hub / github.com/SoftbearStudios/bitcode / error_from_display

Function error_from_display

src/error.rs:20–25  ·  view source on GitHub ↗
(_t: impl Display)

Source from the content-addressed store, hash-verified

18/// Creates an error from a `T:` [`Display`].
19#[cfg(feature = "serde")]
20pub fn error_from_display(_t: impl Display) -> Error {
21 #[cfg(debug_assertions)]
22 return Error(Cow::Owned(_t.to_string()));
23 #[cfg(not(debug_assertions))]
24 Error(())
25}
26
27#[cfg(debug_assertions)]
28type ErrorImpl = Cow<'static, str>;

Callers 1

customMethod · 0.85

Calls 1

ErrorClass · 0.85

Tested by

no test coverage detected