Remove unneeded result

This commit is contained in:
hodasemi 2023-11-29 12:15:31 +01:00
parent aad1618ef3
commit 382d8e1179

View file

@ -133,19 +133,19 @@ impl Swapchain {
device: Arc<Device>,
swapchain_ci: &VkSwapchainCreateInfoKHR,
) -> Result<Arc<Self>> {
Self::from_raw(
Ok(Self::from_raw(
device.clone(),
swapchain_ci,
device.create_swapchain(swapchain_ci)?,
)
))
}
pub fn from_raw(
device: Arc<Device>,
swapchain_ci: &VkSwapchainCreateInfoKHR,
swapchain: VkSwapchainKHR,
) -> Result<Arc<Self>> {
Ok(Arc::new(Swapchain {
) -> Arc<Self> {
Arc::new(Swapchain {
width: AtomicU32::new(swapchain_ci.imageExtent.width),
height: AtomicU32::new(swapchain_ci.imageExtent.height),
usage: swapchain_ci.imageUsage,
@ -162,7 +162,7 @@ impl Swapchain {
swapchain: Mutex::new(swapchain),
raw: true,
}))
})
}
pub fn recreate(&self) -> Result<()> {