Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
parity-scale-codec
Commits
bb6cb646
Unverified
Commit
bb6cb646
authored
Jul 19, 2019
by
thiolliere
Committed by
GitHub
Jul 19, 2019
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
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Cargo.lock
View file @
bb6cb646
...
...
@@ -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)",
...
...
Cargo.toml
View file @
bb6cb646
[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"
...
...
derive/Cargo.toml
View file @
bb6cb646
[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"
...
...
derive/src/lib.rs
View file @
bb6cb646
...
...
@@ -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
}
}
...
...
src/codec.rs
View file @
bb6cb646
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment