From 89cf5402d0668fdda8a337c8b2f09d406c616dae Mon Sep 17 00:00:00 2001 From: marc0246 <40955683+marc0246@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:19:09 +0100 Subject: [PATCH] Fix `VulkanoWindowRenderer::swapchain_image_views` return type I have only noticed this as I was writing the changelog. @coolcatcoder for future reference, `&Vec` 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. --- vulkano-util/src/renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vulkano-util/src/renderer.rs b/vulkano-util/src/renderer.rs index 3f1c4d54..d4bf9bab 100644 --- a/vulkano-util/src/renderer.rs +++ b/vulkano-util/src/renderer.rs @@ -207,7 +207,7 @@ impl VulkanoWindowRenderer { #[inline] #[must_use] // swapchain_image_views or swapchain_images_views, neither sounds good. - pub fn swapchain_image_views(&self) -> &Vec> { + pub fn swapchain_image_views(&self) -> &[Arc] { // Why do we use "final views" as the field name, // yet always externally refer to them as "swapchain image views"? &self.final_views