@@ -206,7 +206,6 @@ impl Error {
206206}
207207
208208impl Drop for Error {
209- #[ inline]
210209 fn drop ( & mut self ) {
211210 if self . drop {
212211 drop ( unsafe { Box :: < [ u8 ] > :: from_raw ( self . data . cast_mut ( ) ) } ) ;
@@ -224,21 +223,18 @@ impl From<Cow<'static, str>> for Error {
224223}
225224
226225impl From < String > for Error {
227- #[ inline]
228226 fn from ( value : String ) -> Self {
229227 Self :: new_string ( value)
230228 }
231229}
232230
233231impl From < & ' static str > for Error {
234- #[ inline]
235232 fn from ( value : & ' static str ) -> Self {
236233 Self :: new_str ( value)
237234 }
238235}
239236
240237impl From < Cow < ' static , [ u8 ] > > for Error {
241- #[ inline]
242238 fn from ( value : Cow < ' static , [ u8 ] > ) -> Self {
243239 match value {
244240 Cow :: Borrowed ( bytes) => Self :: new_bytes ( bytes) ,
@@ -248,21 +244,18 @@ impl From<Cow<'static, [u8]>> for Error {
248244}
249245
250246impl From < & ' static [ u8 ] > for Error {
251- #[ inline]
252247 fn from ( value : & ' static [ u8 ] ) -> Self {
253248 Self :: new_bytes ( value)
254249 }
255250}
256251
257252impl < const N : usize > From < & ' static [ u8 ; N ] > for Error {
258- #[ inline]
259253 fn from ( value : & ' static [ u8 ; N ] ) -> Self {
260254 Self :: new_bytes ( value)
261255 }
262256}
263257
264258impl From < Vec < u8 > > for Error {
265- #[ inline]
266259 fn from ( value : Vec < u8 > ) -> Self {
267260 Self :: new_vec ( value)
268261 }
@@ -279,7 +272,6 @@ impl From<Bytes> for Error {
279272macro_rules! impl_from {
280273 ( $( $t: ty) ,* $( , ) ?) => { $(
281274 impl From <$t> for Error {
282- #[ inline]
283275 fn from( value: $t) -> Self {
284276 Self :: display( value)
285277 }
@@ -309,20 +301,14 @@ impl_from!(
309301) ;
310302
311303impl < T : Into < BackendError > > From < EVMError < T > > for Error {
312- #[ inline]
313304 fn from ( err : EVMError < T > ) -> Self {
314305 Self :: display ( BackendError :: from ( err) )
315306 }
316307}
317308
318309impl From < eyre:: Report > for Error {
319- #[ inline]
320310 fn from ( err : eyre:: Report ) -> Self {
321- let mut chained_cause = String :: new ( ) ;
322- for cause in err. chain ( ) {
323- chained_cause. push_str ( format ! ( " {cause};" ) . as_str ( ) ) ;
324- }
325- Self :: display ( chained_cause)
311+ Self :: from ( foundry_common:: errors:: display_chain ( & err) )
326312 }
327313}
328314
0 commit comments