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

Move ResourceMetadata into its own module, and give it a proper interface #3213

Merged
merged 10 commits into from
Nov 23, 2022

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented Nov 16, 2022

Populating and removing ResourceMetadata elements should affect all three parallel arrays simultaneously. This is easiest to ensure (and show to readers) by making the members private and using a method for insertion. Accesses look cleaner with methods, too.

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories

Description
Describe what problem this is solving, and how it's solved.

Testing
Explain how this change is tested.

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Merging #3213 (f98c2dc) into master (04d12ba) will decrease coverage by 0.07%.
The diff coverage is 63.59%.

@@            Coverage Diff             @@
##           master    #3213      +/-   ##
==========================================
- Coverage   64.70%   64.63%   -0.08%     
==========================================
  Files          81       82       +1     
  Lines       38819    39495     +676     
==========================================
+ Hits        25118    25527     +409     
- Misses      13701    13968     +267     
Impacted Files Coverage Δ
player/src/lib.rs 53.31% <ø> (ø)
wgpu-core/src/id.rs 81.25% <0.00%> (-2.63%) ⬇️
wgpu-core/src/lib.rs 96.55% <ø> (ø)
wgpu-core/src/present.rs 0.00% <0.00%> (ø)
wgpu-core/src/resource.rs 25.13% <ø> (ø)
wgpu-hal/src/dx11/device.rs 0.00% <0.00%> (ø)
wgpu-hal/src/empty.rs 0.00% <ø> (ø)
wgpu-hal/src/lib.rs 26.21% <ø> (ø)
wgpu/src/backend/direct.rs 54.80% <0.00%> (-0.30%) ⬇️
wgpu/src/lib.rs 50.33% <0.00%> (-2.49%) ⬇️
... and 45 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Dope

@cwfitzgerald cwfitzgerald merged commit d4b1d57 into gfx-rs:master Nov 23, 2022
@jimblandy jimblandy deleted the resourcemetadata-interface branch November 23, 2022 23:58
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 this pull request may close these issues.

3 participants