Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RenderPassDescriptor: make label lifetime match doc, and make names d…
…escriptive. (#2654) Lifetime names like `<'a, 'b>` mean that the reader must look at how they are used to understand them. By changing them to `'tex` (lifetime of borrows of the texture views the documentation describes) and `'desc` (everything else), and mentioning them in the documentation, it's more obvious which role each one plays. For consistency, I also changed `begin_render_pass()`, `RenderPassColorAttachment`, and `RenderPassDepthStencilAttachment` to use matching lifetime names. Also, this made it clear that the `Label` had the wrong lifetime -- the docs say that the texture views have a different lifetime from “everything else”, but the `Label` in fact had the same lifetime as the texture views, so I changed it to the `'desc` (formerly `'b`) lifetime. (On review of change history, this mismatch was previously introduced in commit 632f828.) This change is definitely safe because I followed the data flow down to `BasePass::new` which promptly calls `to_string()` on the label, thus converting it to owned data.
- Loading branch information