Skip to content
Myr

Format with rustfmt 2019-09-08

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent db2a298 · Browse files · 1 file+2 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−6 removed

  • other:+2 added−6 removed

1 file+2 added−6 removed

modified:src/error.rs+2 added-6 removed
35 unmodified lines
36 let type_id = TypeId::of::<E>();37 let backtrace = backtrace_if_absent!(error);3839 // Safety: passing typeid of the right type E.40 unsafe {41 Error::construct(error, type_id, backtrace)42 }40 unsafe { Error::construct(error, type_id, backtrace) }41 }4243 pub(crate) fn new_adhoc<M>(message: M, backtrace: Option<Backtrace>) -> Self44 where
3 unmodified lines
48 let type_id = TypeId::of::<M>();4950 // Safety: MessageError is repr(transparent) so MessageError<M> has the51 // same layout as the typeid specifies.54 unsafe {55 Error::construct(error, type_id, backtrace)56 }52 unsafe { Error::construct(error, type_id, backtrace) }53 }5455 // Takes backtrace as argument rather than capturing it here so that the56 // user sees one fewer layer of wrapping noise in the backtrace.
456 unmodified lines