Unverified Commit bb6cb646 authored by thiolliere's avatar thiolliere Committed by GitHub
Browse files

impl debug for error in no_std + fix derive macro (#130)

parent 78c65a28
Pipeline #43775 passed with stages
in 14 minutes and 53 seconds
......@@ -82,7 +82,7 @@ version = "0.1.0"
dependencies = [
"bitvec 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"honggfuzz 0.5.45 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec 1.0.0",
"parity-scale-codec 1.0.2",
]
[[package]]
......@@ -264,20 +264,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "parity-scale-codec"
version = "1.0.0"
version = "1.0.2"
dependencies = [
"arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
"bitvec 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-slice-cast 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec-derive 1.0.0",
"parity-scale-codec-derive 1.0.1",
"serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "parity-scale-codec-derive"
version = "1.0.0"
version = "1.0.1"
dependencies = [
"proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
......
[package]
name = "parity-scale-codec"
description = "SCALE - Simple Concatenating Aggregated Little Endians"
version = "1.0.1"
version = "1.0.2"
authors = ["Parity Technologies <admin@parity.io>"]
license = "Apache-2.0"
repository = "https://github.com/paritytech/parity-scale-codec"
......
[package]
name = "parity-scale-codec-derive"
description = "Serialization and deserialization derive macro for Parity SCALE Codec"
version = "1.0.0"
version = "1.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
license = "Apache-2.0"
edition = "2018"
......
......@@ -148,7 +148,7 @@ pub fn decode_derive(input: TokenStream) -> TokenStream {
fn decode<DecIn: _parity_scale_codec::Input>(
#input_: &mut DecIn
) -> Result<Self, _parity_scale_codec::Error> {
) -> core::result::Result<Self, _parity_scale_codec::Error> {
#decode
}
}
......
......@@ -37,15 +37,14 @@ use std::fmt;
use core::convert::TryFrom;
#[cfg_attr(feature = "std", derive(Debug))]
#[derive(PartialEq)]
#[cfg(feature = "std")]
/// Descriptive error type
#[cfg(feature = "std")]
#[derive(PartialEq, Debug)]
pub struct Error(&'static str);
#[cfg(not(feature = "std"))]
#[derive(PartialEq)]
/// Undescriptive error type when compiled for no std
#[cfg(not(feature = "std"))]
#[derive(PartialEq, Debug)]
pub struct Error;
impl Error {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment