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

Common name for all GlobalCtx producing methods #4431

Open
jimblandy opened this issue May 11, 2023 · 0 comments
Open

Common name for all GlobalCtx producing methods #4431

jimblandy opened this issue May 11, 2023 · 0 comments
Labels
naga Shader Translator

Comments

@jimblandy
Copy link
Member

I think Module::to_ctx and front::spv::BlockContext::gctx should both be named as_global_ctx:

  • We should use a single name for this operation across the code base.
  • Borrowing methods are generally called as_foo in Rust.
  • ctx is too unspecific.

This was originally a comment I had on gfx-rs/naga#2335, but I think making the changes directly in those PRs will make rebasing a nightmare, so let's handle it as a followup.

@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/naga Oct 25, 2023
@cwfitzgerald cwfitzgerald added the naga Shader Translator label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
naga Shader Translator
Projects
None yet
Development

No branches or pull requests

2 participants