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:
marc0246 2024-02-21 09:19:09 +01:00
parent 9a35fb0221
commit 89cf5402d0
No known key found for this signature in database
GPG Key ID: 689CB88C1090C684

View File

@ -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