-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpu: Remove second lifetime parameter from
BeltWritingParts
.
At the time I wrote this I must have still not fully understood how to work with mutable references’ invariance. In fact, `&'a mut T` is invariant in `T` only, not `'a`, so there is no reason for a structure of references not to use the same lifetime for all references regardless of whether mutable or immutable, as long as the lifetime does not appear in any of the referents. The one exception is if it were desirable to be able to copy out a longer-lived `&'sh wgpu::Device`, but that does not occur in this situation — if we needed that, we'd make an `Arc<Device>` or otherwise do it separately from `BeltWritingParts`, which is about writing to the stating belt and nothing else.
- Loading branch information
Showing
2 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters