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.
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.
And here a comment as well plz.
cmichi
left a comment
There was a problem hiding this comment.
Thank you! Just two nitpicks from my side.
Added
keep_attrto#[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