diff --git a/rust/candid/src/error.rs b/rust/candid/src/error.rs index 9caedf9b..1d6008d8 100644 --- a/rust/candid/src/error.rs +++ b/rust/candid/src/error.rs @@ -1,18 +1,18 @@ //! `candid::Result = Result>` use serde::{de, ser}; -use std::{io, num::ParseIntError}; +use std::{io, num::ParseIntError, sync::Arc}; use thiserror::Error; pub type Result = std::result::Result; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Label { pos: usize, message: String, } -#[derive(Debug, Error)] +#[derive(Debug, Clone, Error)] pub enum Error { #[error("binary parser error: {}", .0.first().map_or_else(|| "io error".to_string(), |f| format!("{} at byte offset {}", f.message, f.pos/2)))] Binread(Vec