fix codec build error under feature std (#92)

master
Weiliang Li 6 years ago committed by Andreas Fackler
parent 036b720b7f
commit 624eeee7e4
  1. 4
      src/codec_impl.rs

@ -12,7 +12,9 @@ macro_rules! impl_codec_for {
impl codec::Decode for $type { impl codec::Decode for $type {
fn decode<I: codec::Input>(value: &mut I) -> std::result::Result<Self, codec::Error> { fn decode<I: codec::Input>(value: &mut I) -> std::result::Result<Self, codec::Error> {
let decoded: Vec<u8> = codec::Decode::decode(value)?; let decoded: Vec<u8> = codec::Decode::decode(value)?;
bincode::deserialize(decoded.as_slice()).map_err(|_| codec::Error) bincode::deserialize(decoded.as_slice()).map_err(|_| {
codec::Error::from("parity-scale-codec decode error in threshold_crypto")
})
} }
} }
}; };

Loading…
Cancel
Save