Remove unneeded result
This commit is contained in:
parent
aad1618ef3
commit
382d8e1179
1 changed files with 5 additions and 5 deletions
|
@ -133,19 +133,19 @@ impl Swapchain {
|
||||||
device: Arc<Device>,
|
device: Arc<Device>,
|
||||||
swapchain_ci: &VkSwapchainCreateInfoKHR,
|
swapchain_ci: &VkSwapchainCreateInfoKHR,
|
||||||
) -> Result<Arc<Self>> {
|
) -> Result<Arc<Self>> {
|
||||||
Self::from_raw(
|
Ok(Self::from_raw(
|
||||||
device.clone(),
|
device.clone(),
|
||||||
swapchain_ci,
|
swapchain_ci,
|
||||||
device.create_swapchain(swapchain_ci)?,
|
device.create_swapchain(swapchain_ci)?,
|
||||||
)
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_raw(
|
pub fn from_raw(
|
||||||
device: Arc<Device>,
|
device: Arc<Device>,
|
||||||
swapchain_ci: &VkSwapchainCreateInfoKHR,
|
swapchain_ci: &VkSwapchainCreateInfoKHR,
|
||||||
swapchain: VkSwapchainKHR,
|
swapchain: VkSwapchainKHR,
|
||||||
) -> Result<Arc<Self>> {
|
) -> Arc<Self> {
|
||||||
Ok(Arc::new(Swapchain {
|
Arc::new(Swapchain {
|
||||||
width: AtomicU32::new(swapchain_ci.imageExtent.width),
|
width: AtomicU32::new(swapchain_ci.imageExtent.width),
|
||||||
height: AtomicU32::new(swapchain_ci.imageExtent.height),
|
height: AtomicU32::new(swapchain_ci.imageExtent.height),
|
||||||
usage: swapchain_ci.imageUsage,
|
usage: swapchain_ci.imageUsage,
|
||||||
|
@ -162,7 +162,7 @@ impl Swapchain {
|
||||||
swapchain: Mutex::new(swapchain),
|
swapchain: Mutex::new(swapchain),
|
||||||
|
|
||||||
raw: true,
|
raw: true,
|
||||||
}))
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn recreate(&self) -> Result<()> {
|
pub fn recreate(&self) -> Result<()> {
|
||||||
|
|
Loading…
Reference in a new issue