-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature for enabling decoding #59
Conversation
# Conflicts: # src/ty/fields.rs # src/ty/mod.rs
not sure there is a need for it, is there? |
Just wanted to make absolutely sure before merging and cutting a release. See use-ink/ink#672 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR! this is definitely a big improvement over the previous design.
/// Trait for types which can be used to represent strings in type definitions. | ||
pub trait FormString: | ||
AsRef<str> + PartialEq + Eq + PartialOrd + Ord + Clone + Debug | ||
{ | ||
} | ||
|
||
impl FormString for &'static str {} | ||
impl FormString for String {} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glad it is gone
Possible solution for #58, reverting #35
If the
decode
orstd
feature is enabled thenPortableForm::String
will be an ownedString
which allow decoding. Otherwise it will be a&'static str
(this is required for substrate runtimes).todo
ink!