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

Provide native way to cast Deps(Mut)<Custom> to Deps(Mut)<Empty> #1812

Closed
jawoznia opened this issue Aug 14, 2023 · 0 comments · Fixed by #1813
Closed

Provide native way to cast Deps(Mut)<Custom> to Deps(Mut)<Empty> #1812

jawoznia opened this issue Aug 14, 2023 · 0 comments · Fixed by #1813

Comments

@jawoznia
Copy link
Contributor

    pub fn to_empty(self) -> QuerierWrapper<'a, Empty> {
        QuerierWrapper {
            querier: self.querier,
            custom_query_type: PhantomData,
        }
    }


impl<'a, C: CustomQuery> Deps<'a, C> {
    pub fn to_empty(self) -> Deps<'a, Empty> {
        Deps {
            storage: self.storage,
            api: self.api,
            querier: self.querier.to_empty(),
        }
    }
}
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.

1 participant