Skip to content
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

feat: make callable point takes deps as the first arg #233

Merged
merged 6 commits into from
Sep 2, 2022

Conversation

loloicci
Copy link
Contributor

Description

This PR changes the callable_point macro and makes callable point functions take deps typed Deps or DepsMut as the first arg.

For example,

before this PR:

#[callable_point]
fn add(by: i32) {
    GlobalApi::with_deps_mut(|deps| handle_add(deps, by)).unwrap();
}

after this PR:

#[callable_point]
fn add(deps: DepsMut, by: i32) {
    handle_add(deps, by).unwrap()
}

And, this PR removes GlobalApi's function to get deps.

Part of #213

Types of changes

  • Bug fix (changes which fixes an issue)
  • New feature (changes which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ETC (build, ci, docs, perf, refactor, style, test)

Checklist

@loloicci loloicci added the dynamic_link relate the dynamic link call feature label Aug 24, 2022
@loloicci loloicci self-assigned this Aug 24, 2022
@loloicci loloicci force-pushed the deps-env branch 3 times, most recently from 2513f68 to a736d32 Compare August 24, 2022 10:43
@loloicci loloicci marked this pull request as ready for review August 24, 2022 10:44
Copy link
Contributor

@shiki-tak shiki-tak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@loloicci loloicci merged commit d601ee1 into Finschia:dynamic_link Sep 2, 2022
@loloicci loloicci deleted the deps-env branch September 2, 2022 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamic_link relate the dynamic link call feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants