Commit c945b48b authored by Hero Bird's avatar Hero Bird

[pdsl_model] NAME consts are now [u8] to indicate non unicode

parent b55534e0
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(const_fn)]
#![feature(
const_fn,
const_str_as_bytes,
)]
#![allow(unused)]
......
......@@ -16,9 +16,10 @@ pub trait ContractState:
///
/// # Note
///
/// - This should be a valid Rust identifier.
/// - Normally you simply want to use the name of the contract here.
const NAME: &'static str;
/// - This must be a valid Rust identifier.
/// - Normally this reflects the name of the contract.
// const NAME: &'static str;
const NAME: &'static [u8];
}
/// Define contract state with less boilerplate code.
......@@ -64,7 +65,7 @@ macro_rules! state {
}
impl pdsl_model::state::ContractState for $state_name {
const NAME: &'static str = stringify!($state_name);
const NAME: &'static [u8] = stringify!($state_name).as_bytes();
}
};
}
......
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