no_std support for substrate trie (#2146)

* no_std trie compile in test_runtime (require to set nightly feature due
to the way hashbrown currently works).

* No nightly with hashmap_core.

* using crate elastic-array

* switch to publish trie crates

* fix default array decl

* bump impl_version for ci

* set all semver when possible wasm, and remove redundant code.

* Actually test use_trie function

* impl version +1

* Bump impl version
This commit is contained in:
cheme
2019-04-02 12:49:04 +02:00
committed by Bastian Köcher
parent 728f0393c7
commit 669e79181e
16 changed files with 150 additions and 65 deletions
+4
View File
@@ -6,7 +6,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[cfg(feature="std")]
use std::fmt;
#[cfg(feature="std")]
use std::error::Error as StdError;
#[derive(Debug, PartialEq, Eq, Clone)]
@@ -16,12 +18,14 @@ pub enum Error {
BadFormat,
}
#[cfg(feature="std")]
impl StdError for Error {
fn description(&self) -> &str {
"codec error"
}
}
#[cfg(feature="std")]
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Debug::fmt(&self, f)