-
Notifications
You must be signed in to change notification settings - Fork 443
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
Added keep_attr
to #[ink::contract]
and #[ink::trait_definition]
#1145
Added keep_attr
to #[ink::contract]
and #[ink::trait_definition]
#1145
Conversation
…` to manage that attributes should be passed to call builder during codegen.
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑
These are the results when building the
Link to the run | Last update: Thu Feb 24 12:30:54 CET 2022 |
Codecov Report
@@ Coverage Diff @@
## master #1145 +/- ##
==========================================
+ Coverage 78.69% 78.73% +0.04%
==========================================
Files 252 254 +2
Lines 9395 9448 +53
==========================================
+ Hits 7393 7439 +46
- Misses 2002 2009 +7
Continue to review full report at Codecov.
|
} | ||
|
||
impl WhitelistedAttributes { | ||
pub fn parse_arg_value(&mut self, arg: &MetaNameValue) -> Result<(), syn::Error> { |
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.
PR looks solid, could you add a comment to this pub
function here please?
} | ||
} | ||
|
||
pub fn filter_attr(&self, attrs: Vec<syn::Attribute>) -> Vec<syn::Attribute> { |
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.
And here a comment as well plz.
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.
Thank you! Just two nitpicks from my side.
Added
keep_attr
to#[ink::contract]
and#[ink::trait_definition]
to manage that attributes should be passed to call builder during codegen. All attributes are ignore by default except:cfg
,cfg_attr
,allow
,warn
,deny
,forbid
,deprecated
,must_use
,doc
.More information in the conversation of #1130