-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: disentangle bindgen code generation (#1033)
* rename `AttrSigInfo` to `AttrSigInfoV1` * temporarily duplicate `AttrSigInfoV1` and V2 functionality * temporarily derive `Clone` for `AttrSigInfoV2` (Needed to let us convert from a reference to `AttrSigInfoV1`) * hoist `returns` from `MethodKind` (The value of `returns` is not dependent on the `MethodKind` variant and all variants have it. But having it inside `MethodKind` makes it awkward to access, so this commit moves it up to `AttrSigInfo`) * replace `AttrSigInfoV1` with V2 where structure is not affected * add test for `handle_result` with `&mut self` * refactor `method_wrapper` to use `AttrSigInfoV2` * remove unused methods * add tracking issue to refactor abi generator
- Loading branch information
Showing
13 changed files
with
492 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 7 additions & 2 deletions
9
near-sdk-macros/src/core_impl/code_generator/attr_sig_info.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.