shapelib wants this for SubstErrors which ought to be Clone.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
#[error("Unsupported colour spec")]
pub struct UnsupportedColourSpec;
-#[derive(Error)]
+#[derive(Error,Clone)]
pub struct InternalLogicError {
desc: Cow<'static, str>,
- backtrace: parking_lot::Mutex<backtrace::Backtrace>,
+ backtrace: Arc<parking_lot::Mutex<backtrace::Backtrace>>,
}
pub fn internal_error_bydebug(desc: &dyn Debug) -> IE {
let backtrace = backtrace::Backtrace::new_unresolved();
InternalLogicError {
desc: desc.into(),
- backtrace: parking_lot::Mutex::new(backtrace),
+ backtrace: Arc::new(parking_lot::Mutex::new(backtrace)),
}
}
}