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

[wgpu] Remove unused ObjectId field of SubmissionIndex. #5780

Merged

Conversation

jimblandy
Copy link
Member

This removes warnings that field 0 of SubmissionIndex is never used.

I only see these warnings when referring to wgpu via a path dependency, not when fetching it from crates.io, and I don't really understand why. I wonder if this is related to rust-lang/cargo#8546.


Drop the first field of wgpu::SubmissionIndex, as it is unused. Adjust uses of the types' other field.

Delete the wgpu::context::Context trait's SubmissionIndex associated type. Remove it from implementations.

Drop the first field of the Context trait's queue_submit method's return value. Adjust implementations.

@jimblandy jimblandy added the kind: refactor Making existing function faster or nicer label Jun 6, 2024
@jimblandy jimblandy requested a review from a team as a code owner June 6, 2024 19:59
@jimblandy jimblandy force-pushed the submissionindex-unused-objectid branch from e68e497 to 5510a85 Compare June 6, 2024 20:04
@jimblandy
Copy link
Member Author

I'm not sure about this PR at all. It seems like rustc or cargo are confused about something.

Drop the first field of `wgpu::SubmissionIndex`, as it is unused.
Adjust uses of the types' other field.

Delete the `wgpu::context::Context` trait's `SubmissionIndex`
associated type. Remove it from implementations.

Drop the first field of the `Context` trait's `queue_submit` method's
return value. Adjust implementations.
@jimblandy jimblandy force-pushed the submissionindex-unused-objectid branch from 5510a85 to db6d405 Compare June 6, 2024 23:44
@ErichDonGubler
Copy link
Member

IIRC, this also has something to do with the toolchain version? Not sure about the specifics, but I don't see a reason to keep an unused field around, in general. 🤷🏻‍♂️

@ErichDonGubler ErichDonGubler merged commit 6c37052 into gfx-rs:trunk Jun 10, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: refactor Making existing function faster or nicer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants