Fix fixed-hash (#110)

* Fix the problem that the current fixed-hash cannot be defined in constant directly

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* cargo fmt

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Revert "cargo fmt"

This reverts commit 529720df1557f42edffe5acf1d24e2b7b4d4da32.

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen 2019-03-08 04:17:48 +08:00 committed by Bastian Köcher
parent a31b51ca31
commit c64e1b52e6
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "fixed-hash"
version = "0.3.0"
version = "0.3.1"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
homepage = "https://github.com/paritytech/parity-common"

View File

@ -51,7 +51,7 @@ macro_rules! construct_fixed_hash {
( $(#[$attr:meta])* $visibility:vis struct $name:ident ( $n_bytes:expr ); ) => {
#[repr(C)]
$(#[$attr])*
$visibility struct $name ([u8; $n_bytes]);
$visibility struct $name (pub [u8; $n_bytes]);
impl From<[u8; $n_bytes]> for $name {
/// Constructs a hash type from the given bytes array of fixed length.