Commit 242fe971 authored by Andrew Jones's avatar Andrew Jones Committed by Hero Bird

[core] implement empty Flush for default AccountId and Hash types (#151)

* [core] implement empty Flush for AccountId and Hash to fix erc20 example

* [core] rustfmt
parent 22c4b2d3
......@@ -14,16 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with ink!. If not, see <http://www.gnu.org/licenses/>.
use core::{
array::TryFromSliceError,
convert::TryFrom,
};
use core::{array::TryFromSliceError, convert::TryFrom};
use crate::env::EnvTypes;
use parity_codec::{
Decode,
Encode,
};
use crate::{env::EnvTypes, impl_empty_flush_for, storage::Flush};
use parity_codec::{Decode, Encode};
/// The SRML fundamental types.
#[allow(unused)]
......@@ -83,3 +77,5 @@ pub type Moment = u64;
/// The default SRML blocknumber type.
pub type BlockNumber = u64;
impl_empty_flush_for!(AccountId, Hash);
......@@ -42,6 +42,7 @@ pub trait Flush {
fn flush(&mut self);
}
#[macro_export]
macro_rules! impl_empty_flush_for {
( $($ty:ty),* ) => {
$(
......
Markdown is supported
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