Qinxuan Chen
c64e1b52e6
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>
2019-03-07 21:17:48 +01:00
Herobird
cb11411750
[fixed-hash] Mute unused warning for static_assertions crate import
...
The compilers falsely warns that #[macro_use(..)] is unused since it does not check all available configurations.
This silences the warning locally.
2018-11-12 11:17:40 +01:00
Herobird
bbd8b62792
[fixed-hash] Make macro_use for static_assertions more explicit
2018-11-12 11:10:59 +01:00
Herobird
f6edce2134
[fixed-hash] Bump version to 0.3.0 (no longer beta!)
2018-11-12 11:08:17 +01:00
Herobird
5476f5e3af
[fixed-hash] Bump version to 0.3.0-beta.4
2018-11-06 18:30:27 +01:00
Herobird
272a53c9c7
[fixed-hash] Add #[inline] where appropriate
2018-11-06 18:29:46 +01:00
Herobird
c471cf50db
[fixed-hash] Add From<&{mut} [u8; N]> impls for hash types of size N
2018-11-06 18:29:23 +01:00
Herobird
3120350787
[fixed-hash] Fix docs.rs used features
2018-11-06 18:14:24 +01:00
Herobird
9c289cac46
[fixed-hash] Bump version 0.3.0-beta.2 => 0.3.0-beta.3
2018-11-05 18:46:04 +01:00
Herobird
25b544c49a
[fixed-hash] Add Hash::as_fixed_bytes{_mut} methods
2018-11-05 18:44:27 +01:00
Herobird
68475f5001
[fixed-hash] Rename Hash::to_bytes to Hash::to_fixed_bytes
2018-11-05 18:44:11 +01:00
Herobird
7d2375aa5f
[fixed-hash] Bump version to 0.3.0-beta.2
2018-11-05 12:23:40 +01:00
Herobird
6e0453af09
Rename all optional features
...
- rand-support => rand
- byteorder-support => byteorder
- heapsize-support => heapsize
- quickcheck-support => quickcheck
2018-11-05 12:18:39 +01:00
Herobird
1f94d2747d
Separate out feature guarded impl block into their own feature guarded macros
...
This avoids the problems of introducing the feature guarded features in user crates.
2018-11-05 12:14:07 +01:00
Herobird
0bceabb894
Hide export of static_assertions crate
2018-11-05 11:30:45 +01:00
Herobird
f3b8c60216
Bump version to 0.3.0-beta.1
2018-10-31 12:44:43 +01:00
Herobird
7a511df359
Publicly export crate core as core_
...
This fixes a bug that this crate wasn't usable in no_std environments because core wasn't exported publicly by default.
2018-10-31 12:31:10 +01:00
Herobird
617b7b0208
Export static_assertions::const_assert
...
This has the effect that users of the crate no longer have to import the static_assertions crate just to have this macro in scope.
2018-10-31 12:29:46 +01:00
Herobird
59bc634eda
Add info what features are enabled by enabling the std feature
2018-10-30 21:30:13 +01:00
Herobird
8431aea64e
Remove libc feature req of heapsize-support
2018-10-30 21:20:30 +01:00
Herobird
2beacfd92d
Revert heapsize-support changes
...
Seems like heapsize needs libc and target_os = "unknown" settings.
2018-10-30 21:18:51 +01:00
Herobird
1badf67a17
Add Hash::to_bytes api
...
Could be used by uint conversion to avoid length checks.
2018-10-30 18:00:10 +01:00
Herobird
bbe1442da6
Add readme section to Cargo.toml used by crates.io
2018-10-30 16:32:16 +01:00
Herobird
0202383a92
Add README section about available crate features and their purposes
2018-10-30 15:50:03 +01:00
Herobird
dcccb0b158
Rename `impl_hash_conversions` to `impl_fixed_hash_conversions`
2018-10-30 15:49:47 +01:00
Herobird
386a0eb13c
Fix README for renaming of `construct_hash` to `construct_fixed_hash`
2018-10-30 15:49:20 +01:00
Herobird
5713e33573
Rename `construct_hash` macro to `construct_fixed_hash`
...
This should avoid more name collission and is also more clear that the macro is linked to the `fixed-hash` crate.
2018-10-30 15:34:54 +01:00
Herobird
ec30a9f7d4
Replace all whitespace indentation with tabs
2018-10-30 13:00:14 +01:00
Herobird
2d02a6520e
Rename `test` var to `expected` (more clear)
2018-10-30 12:58:28 +01:00
Herobird
7c76d2bf51
Fix docs for impl block of byteorder-support
2018-10-30 12:58:12 +01:00
Herobird
baff409671
Improve doc comment for Hash::repeat_byte
2018-10-30 12:57:54 +01:00
Herobird
dda1009e64
Improve doc-comment and doc-test for construct_hash macro
2018-10-30 12:27:12 +01:00
Herobird
a82c72d12a
Document the api-dummy feature
2018-10-30 12:26:52 +01:00
Herobird
93d18df0ad
Remove restriction to libc feature usage for heapsize impl
2018-10-30 12:14:06 +01:00
Herobird
3e51054b65
Use byteorder version 1.2 instead of 1.2.7
2018-10-30 12:13:45 +01:00
Herobird
cd4533a341
Remove deprecated section of the README
...
Deprecated since this crate no longer supports interoperability with uint in version 0.3.
This support has to be provided from the outside, like pwasm-std.
2018-10-29 20:47:21 +01:00
Herobird
eaf04c7795
Bump version to 0.3.0-beta.0
2018-10-29 20:09:11 +01:00
Herobird
e18d568e94
Add support for docs.rs
...
This crate now generates a useful ApiDummy hash type for the purpose of API inspection at docs.rs.
Also the Cargo.toml now refers to the documentation that is going to be generated at docs.rs once uploaded to crates.io.
2018-10-29 20:08:53 +01:00
Herobird
8ce3fc8c69
Remove all old unit tests in hash.rs
2018-10-29 18:00:43 +01:00
Herobird
1c56636fbf
Replace all spaces with tabs (thanks rustfmt)
2018-10-29 17:59:51 +01:00
Herobird
16696676cb
Add unit tests for ops impls
2018-10-29 17:50:18 +01:00
Herobird
6d9c062fb1
Add unit tests for conversions between two differently sized hash types
2018-10-29 17:32:38 +01:00
Herobird
6266c27b96
Add unit test for optional HeapsizeOf trait impl
2018-10-29 17:32:21 +01:00
Herobird
a75711cb6c
Add unit test for FromStr failure because of too many input digits
2018-10-29 17:22:15 +01:00
Herobird
16e04e9e5c
Add useful doc comment to FromStr impl
2018-10-29 17:21:50 +01:00
Herobird
1295c16d3f
Add unit tests for FromStr impl
2018-10-29 17:18:39 +01:00
Herobird
7dfd557e05
Fix bug in optional quickcheck implementation
2018-10-29 17:09:40 +01:00
Herobird
5303798365
Reordered features in Cargo.toml
2018-10-29 17:05:49 +01:00
Herobird
845291b859
Add rand-support unit tests
2018-10-29 17:05:04 +01:00
Herobird
0d9409ed7c
Add some doc comment notes for some constructors
...
Shall make users aware of big endian interpretation.
2018-10-29 16:53:46 +01:00