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

Change of visibility in macro #54

Open
0xstepit opened this issue May 11, 2024 · 2 comments · May be fixed by #55
Open

Change of visibility in macro #54

0xstepit opened this issue May 11, 2024 · 2 comments · May be fixed by #55

Comments

@0xstepit
Copy link

The macro fn_execute change the visibility of the created function when pub is not specified.

($name:ident: $req:ty[$type_url:expr] => $res:ty) => {
    pub fn $name(
        &self,
        msg: $req,
        signer: &$crate::SigningAccount,
    ) -> $crate::RunnerExecuteResult<$res> {
        self.runner.execute(msg, $type_url, signer)
    }
};
($name:ident: $req:ty => $res:ty) => {
    pub fn $name(
        &self,
        msg: $req,
        signer: &$crate::SigningAccount,
    ) -> $crate::RunnerExecuteResult<$res> {
        self.runner.execute(msg, <$req>::TYPE_URL, signer)
    }
};

I saw that in fn_query the visibility is maintained. Is this intentional? Thanks!

@iboss-ptk
Copy link
Collaborator

Nice catch! will work on it!

@0xstepit 0xstepit linked a pull request Jun 22, 2024 that will close this issue
@0xstepit
Copy link
Author

@iboss-ptk here the fix #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants