Skip to content

Conversation

cwfitzgerald
Copy link
Member

@cwfitzgerald cwfitzgerald commented Dec 20, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.

Connections

Follow up to #3163

Description

Fixes a couple of small issues with strict-asserts.

  • Enabling wgpu/strict-asserts would unconditionally pull in wgpu-core.
  • wgpu-core still had it's assertions.rs file, despite the asserts moving to wgpu-types
  • strict_unwrap_unchecked was missing unsafe on the caller
  • Added more documentation to the assertion module.
  • Strict asserts shouldn't be default on in the wgpu crate.

Testing
None

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2022

Codecov Report

Merging #3320 (df4a1e1) into master (4c5fef4) will decrease coverage by 0.07%.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##           master    #3320      +/-   ##
==========================================
- Coverage   64.18%   64.11%   -0.08%     
==========================================
  Files          86       86              
  Lines       42553    42557       +4     
==========================================
- Hits        27313    27285      -28     
- Misses      15240    15272      +32     
Impacted Files Coverage Δ
wgpu-types/src/assertions.rs 37.50% <0.00%> (-12.50%) ⬇️
wgpu-hal/src/dx12/suballocation.rs 85.92% <100.00%> (+0.42%) ⬆️
wgpu-core/src/track/buffer.rs 84.86% <0.00%> (-4.22%) ⬇️
wgpu-core/src/track/metadata.rs 89.47% <0.00%> (-1.51%) ⬇️
wgpu-core/src/track/texture.rs 59.46% <0.00%> (-0.50%) ⬇️
wgpu/src/context.rs 52.73% <0.00%> (-0.11%) ⬇️

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

@jimblandy jimblandy merged commit 9b9cc33 into gfx-rs:master Dec 21, 2022
@cwfitzgerald cwfitzgerald deleted the unified-assertions branch December 21, 2022 06:25
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