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

use smallvec instead of inplace_it #2889

Merged
merged 3 commits into from
Sep 2, 2022

Conversation

mockersf
Copy link
Contributor

@mockersf mockersf commented Jul 15, 2022

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

Description
Remove inplace_it to use smallvec instead. While inlace_it tries to be clever with the size of the array used, I just set it to 32 in smallvec
On latest nightly, inplace_it fails to compile. This will probably be fixed on Rust (rust-lang/rust#99288) or inplace_it (NotIntMan/inplace_it#11), but inplace_it hasn't been updated in a while.

Testing
This is Vulkan only change and I don't have a Vulkan capable machine, so not tested a lot...

@mockersf mockersf changed the title use smallvec instead of inlace_it use smallvec instead of inplace_it Jul 15, 2022
@notgull
Copy link

notgull commented Jul 16, 2022

Could we use tinyvec instead and reduce the unsafe code surface?

@mockersf
Copy link
Contributor Author

I went with smallvec as it's already in tree

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.

I'm just going to say this is fine for now - we really should revisit this stuff later if we have a more coherent allocation solution.

@jimblandy jimblandy merged commit 27f6302 into gfx-rs:master Sep 2, 2022
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.

4 participants