Closed carado closed 4 years ago
You are right, we do not need it.
However, given that wgpu
is still shaping up, asking for a mutable reference is a safe default. If we end up not needing it once the API stabilizes, then we will be able to drop it without affecting our users much.
That's fair, thanks for your response.
From my own attempts at working with wgpu, it seems like the wgpu::Device only needs to get mutably borrowed for submitting CommandBuffers into the queue.
Indeed, I can run the following line in wgpu_glyph:
and the whole crate can still be built without any issue, and its example binary still runs perfectly fine.