mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Fix VulkanoWindowRenderer::swapchain_image_views
return type
I have only noticed this as I was writing the changelog. @coolcatcoder for future reference, `&Vec<T>` is an anti-pattern. There's nothing more you can do with it than with `&[T]` (because the reference is immutable) and it means that we can't use a different underlying buffer without a breaking change.
This commit is contained in:
parent
9a35fb0221
commit
89cf5402d0
@ -207,7 +207,7 @@ impl VulkanoWindowRenderer {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
// swapchain_image_views or swapchain_images_views, neither sounds good.
|
// swapchain_image_views or swapchain_images_views, neither sounds good.
|
||||||
pub fn swapchain_image_views(&self) -> &Vec<Arc<ImageView>> {
|
pub fn swapchain_image_views(&self) -> &[Arc<ImageView>] {
|
||||||
// Why do we use "final views" as the field name,
|
// Why do we use "final views" as the field name,
|
||||||
// yet always externally refer to them as "swapchain image views"?
|
// yet always externally refer to them as "swapchain image views"?
|
||||||
&self.final_views
|
&self.final_views
|
||||||
|
Loading…
Reference in New Issue
Block a user