File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl Ruby {
9494pub type Result < T > = std:: result:: Result < T , Error > ;
9595
9696/// The possible types of [`Error`].
97- #[ derive( Debug ) ]
97+ #[ derive( Debug , Clone ) ]
9898pub enum ErrorType {
9999 /// An interrupt, such as `break` or `throw`.
100100 Jump ( Tag ) ,
@@ -106,7 +106,7 @@ pub enum ErrorType {
106106}
107107
108108/// Wrapper type for Ruby `Exception`s or other interrupts.
109- #[ derive( Debug ) ]
109+ #[ derive( Debug , Clone ) ]
110110pub struct Error ( ErrorType ) ;
111111
112112impl Error {
@@ -350,6 +350,7 @@ impl IntoError for Error {
350350/// Note that `OpaqueError` contains a Ruby value, so must be kept on the stack
351351/// of a Ruby thread to prevent it from being Garbage Collected (or otherwise
352352/// protected from premature GC).
353+ #[ derive( Clone ) ]
353354pub struct OpaqueError ( ErrorType ) ;
354355
355356unsafe impl Send for OpaqueError { }
@@ -394,7 +395,7 @@ impl IntoError for OpaqueError {
394395
395396/// The state of a call to Ruby exiting early, interrupting the normal flow
396397/// of code.
397- #[ derive( Debug ) ]
398+ #[ derive( Debug , Clone , Copy ) ]
398399#[ repr( i32 ) ]
399400pub enum Tag {
400401 // None = 0,
You can’t perform that action at this time.
0 commit comments