From 325246c0261783dfadfdee8b89559e264fcf48a4 Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Mon, 9 Jul 2018 09:23:21 +0200 Subject: [PATCH] Rename Result::Success to Result::SUCCESS --- ash/src/device.rs | 76 ++++++++++++------------- ash/src/entry.rs | 6 +- ash/src/extensions/android_surface.rs | 2 +- ash/src/extensions/debug_marker.rs | 2 +- ash/src/extensions/debug_report.rs | 2 +- ash/src/extensions/display_swapchain.rs | 2 +- ash/src/extensions/ios_surface.rs | 2 +- ash/src/extensions/macos_surface.rs | 2 +- ash/src/extensions/mir_surface.rs | 2 +- ash/src/extensions/surface.rs | 6 +- ash/src/extensions/swapchain.rs | 8 +-- ash/src/extensions/wayland_surface.rs | 2 +- ash/src/extensions/win32_surface.rs | 2 +- ash/src/extensions/xcb_surface.rs | 2 +- ash/src/extensions/xlib_surface.rs | 2 +- ash/src/instance.rs | 8 +-- 16 files changed, 63 insertions(+), 63 deletions(-) diff --git a/ash/src/device.rs b/ash/src/device.rs index 490a68f..7e77314 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -247,7 +247,7 @@ pub trait DeviceV1_0 { &mut sampler, ); match err_code { - vk::Result::Success => Ok(sampler), + vk::Result::SUCCESS => Ok(sampler), _ => Err(err_code), } } @@ -407,7 +407,7 @@ pub trait DeviceV1_0 { desc_set.set_len(create_info.descriptor_set_count as usize); match err_code { - vk::Result::Success => Ok(desc_set), + vk::Result::SUCCESS => Ok(desc_set), _ => Err(err_code), } } @@ -425,7 +425,7 @@ pub trait DeviceV1_0 { &mut layout, ); match err_code { - vk::Result::Success => Ok(layout), + vk::Result::SUCCESS => Ok(layout), _ => Err(err_code), } } @@ -434,7 +434,7 @@ pub trait DeviceV1_0 { unsafe { let err_code = self.fp_v1_0().device_wait_idle(self.handle()); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -453,7 +453,7 @@ pub trait DeviceV1_0 { &mut pool, ); match err_code { - vk::Result::Success => Ok(pool), + vk::Result::SUCCESS => Ok(pool), _ => Err(err_code), } } @@ -467,7 +467,7 @@ pub trait DeviceV1_0 { .fp_v1_0() .reset_descriptor_pool(self.handle(), pool, flags); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -481,7 +481,7 @@ pub trait DeviceV1_0 { .fp_v1_0() .reset_command_pool(self.handle(), command_pool, flags); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -493,7 +493,7 @@ pub trait DeviceV1_0 { ) -> VkResult<()> { let err_code = self.fp_v1_0().reset_command_buffer(command_buffer, flags); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -505,7 +505,7 @@ pub trait DeviceV1_0 { fences.as_ptr(), ); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -881,7 +881,7 @@ pub trait DeviceV1_0 { ); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -942,7 +942,7 @@ pub trait DeviceV1_0 { &mut semaphore, ); match err_code { - vk::Result::Success => Ok(semaphore), + vk::Result::SUCCESS => Ok(semaphore), _ => Err(err_code), } } @@ -964,7 +964,7 @@ pub trait DeviceV1_0 { ); pipelines.set_len(create_infos.len()); match err_code { - vk::Result::Success => Ok(pipelines), + vk::Result::SUCCESS => Ok(pipelines), _ => Err((pipelines, err_code)), } } @@ -986,7 +986,7 @@ pub trait DeviceV1_0 { ); pipelines.set_len(create_infos.len()); match err_code { - vk::Result::Success => Ok(pipelines), + vk::Result::SUCCESS => Ok(pipelines), _ => Err((pipelines, err_code)), } } @@ -1004,7 +1004,7 @@ pub trait DeviceV1_0 { &mut buffer, ); match err_code { - vk::Result::Success => Ok(buffer), + vk::Result::SUCCESS => Ok(buffer), _ => Err(err_code), } } @@ -1022,7 +1022,7 @@ pub trait DeviceV1_0 { &mut pipeline_layout, ); match err_code { - vk::Result::Success => Ok(pipeline_layout), + vk::Result::SUCCESS => Ok(pipeline_layout), _ => Err(err_code), } } @@ -1041,7 +1041,7 @@ pub trait DeviceV1_0 { ); match err_code { - vk::Result::Success => Ok(pipeline_cache), + vk::Result::SUCCESS => Ok(pipeline_cache), _ => Err(err_code), } } @@ -1058,7 +1058,7 @@ pub trait DeviceV1_0 { self.fp_v1_0() .map_memory(self.handle(), memory, offset, size, flags, &mut data); match err_code { - vk::Result::Success => Ok(data), + vk::Result::SUCCESS => Ok(data), _ => Err(err_code), } } @@ -1077,7 +1077,7 @@ pub trait DeviceV1_0 { ranges.as_ptr(), ); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1089,7 +1089,7 @@ pub trait DeviceV1_0 { ranges.as_ptr(), ); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1107,7 +1107,7 @@ pub trait DeviceV1_0 { &mut framebuffer, ); match err_code { - vk::Result::Success => Ok(framebuffer), + vk::Result::SUCCESS => Ok(framebuffer), _ => Err(err_code), } } @@ -1160,7 +1160,7 @@ pub trait DeviceV1_0 { &mut renderpass, ); match err_code { - vk::Result::Success => Ok(renderpass), + vk::Result::SUCCESS => Ok(renderpass), _ => Err(err_code), } } @@ -1174,7 +1174,7 @@ pub trait DeviceV1_0 { .fp_v1_0() .begin_command_buffer(command_buffer, create_info); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1182,7 +1182,7 @@ pub trait DeviceV1_0 { unsafe fn end_command_buffer(&self, command_buffer: vk::CommandBuffer) -> VkResult<()> { let err_code = self.fp_v1_0().end_command_buffer(command_buffer); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1201,7 +1201,7 @@ pub trait DeviceV1_0 { timeout, ); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1209,7 +1209,7 @@ pub trait DeviceV1_0 { unsafe fn get_fence_status(&self, fence: vk::Fence) -> VkResult<()> { let err_code = self.fp_v1_0().get_fence_status(self.handle(), fence); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1217,7 +1217,7 @@ pub trait DeviceV1_0 { unsafe fn queue_wait_idle(&self, queue: vk::Queue) -> VkResult<()> { let err_code = self.fp_v1_0().queue_wait_idle(queue); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1235,7 +1235,7 @@ pub trait DeviceV1_0 { fence, ); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1253,7 +1253,7 @@ pub trait DeviceV1_0 { &mut buffer_view, ); match err_code { - vk::Result::Success => Ok(buffer_view), + vk::Result::SUCCESS => Ok(buffer_view), _ => Err(err_code), } } @@ -1283,7 +1283,7 @@ pub trait DeviceV1_0 { &mut image_view, ); match err_code { - vk::Result::Success => Ok(image_view), + vk::Result::SUCCESS => Ok(image_view), _ => Err(err_code), } } @@ -1300,7 +1300,7 @@ pub trait DeviceV1_0 { ); buffers.set_len(create_info.command_buffer_count as vk::size_t); match err_code { - vk::Result::Success => Ok(buffers), + vk::Result::SUCCESS => Ok(buffers), _ => Err(err_code), } } @@ -1318,7 +1318,7 @@ pub trait DeviceV1_0 { &mut pool, ); match err_code { - vk::Result::Success => Ok(pool), + vk::Result::SUCCESS => Ok(pool), _ => Err(err_code), } } @@ -1336,7 +1336,7 @@ pub trait DeviceV1_0 { &mut pool, ); match err_code { - vk::Result::Success => Ok(pool), + vk::Result::SUCCESS => Ok(pool), _ => Err(err_code), } } @@ -1354,7 +1354,7 @@ pub trait DeviceV1_0 { &mut image, ); match err_code { - vk::Result::Success => Ok(image), + vk::Result::SUCCESS => Ok(image), _ => Err(err_code), } } @@ -1407,7 +1407,7 @@ pub trait DeviceV1_0 { &mut memory, ); match err_code { - vk::Result::Success => Ok(memory), + vk::Result::SUCCESS => Ok(memory), _ => Err(err_code), } } @@ -1425,7 +1425,7 @@ pub trait DeviceV1_0 { &mut shader, ); match err_code { - vk::Result::Success => Ok(shader), + vk::Result::SUCCESS => Ok(shader), _ => Err(err_code), } } @@ -1443,7 +1443,7 @@ pub trait DeviceV1_0 { &mut fence, ); match err_code { - vk::Result::Success => Ok(fence), + vk::Result::SUCCESS => Ok(fence), _ => Err(err_code), } } @@ -1458,7 +1458,7 @@ pub trait DeviceV1_0 { self.fp_v1_0() .bind_buffer_memory(self.handle(), buffer, device_memory, offset); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -1473,7 +1473,7 @@ pub trait DeviceV1_0 { self.fp_v1_0() .bind_image_memory(self.handle(), image, device_memory, offset); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } diff --git a/ash/src/entry.rs b/ash/src/entry.rs index 586b74e..b4d0590 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -82,7 +82,7 @@ pub trait EntryV1_0 { allocation_callbacks.as_raw_ptr(), &mut instance, ); - if err_code != vk::Result::Success { + if err_code != vk::Result::SUCCESS { return Err(InstanceError::VkError(err_code)); } let instance_fp = @@ -103,7 +103,7 @@ pub trait EntryV1_0 { .enumerate_instance_layer_properties(&mut num, v.as_mut_ptr()); v.set_len(num as usize); match err_code { - vk::Result::Success => Ok(v), + vk::Result::SUCCESS => Ok(v), _ => Err(err_code), } } @@ -125,7 +125,7 @@ pub trait EntryV1_0 { ); data.set_len(num as usize); match err_code { - vk::Result::Success => Ok(data), + vk::Result::SUCCESS => Ok(data), _ => Err(err_code), } } diff --git a/ash/src/extensions/android_surface.rs b/ash/src/extensions/android_surface.rs index a56cf08..881a121 100644 --- a/ash/src/extensions/android_surface.rs +++ b/ash/src/extensions/android_surface.rs @@ -43,7 +43,7 @@ impl AndroidSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/debug_marker.rs b/ash/src/extensions/debug_marker.rs index 13a9d33..3240bba 100644 --- a/ash/src/extensions/debug_marker.rs +++ b/ash/src/extensions/debug_marker.rs @@ -36,7 +36,7 @@ impl DebugMarker { .debug_marker_fn .debug_marker_set_object_name_ext(device, name_info); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } diff --git a/ash/src/extensions/debug_report.rs b/ash/src/extensions/debug_report.rs index 335e248..35e00e5 100644 --- a/ash/src/extensions/debug_report.rs +++ b/ash/src/extensions/debug_report.rs @@ -55,7 +55,7 @@ impl DebugReport { &mut debug_cb, ); match err_code { - vk::Result::Success => Ok(debug_cb), + vk::Result::SUCCESS => Ok(debug_cb), _ => Err(err_code), } } diff --git a/ash/src/extensions/display_swapchain.rs b/ash/src/extensions/display_swapchain.rs index 1798f8d..d195e72 100644 --- a/ash/src/extensions/display_swapchain.rs +++ b/ash/src/extensions/display_swapchain.rs @@ -45,7 +45,7 @@ impl DisplaySwapchain { ); swapchains.set_len(create_infos.len()); match err_code { - vk::Result::Success => Ok(swapchains), + vk::Result::SUCCESS => Ok(swapchains), _ => Err(err_code), } } diff --git a/ash/src/extensions/ios_surface.rs b/ash/src/extensions/ios_surface.rs index 4a89c68..2e6715f 100644 --- a/ash/src/extensions/ios_surface.rs +++ b/ash/src/extensions/ios_surface.rs @@ -43,7 +43,7 @@ impl IOSSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/macos_surface.rs b/ash/src/extensions/macos_surface.rs index e9cb705..8248cb8 100644 --- a/ash/src/extensions/macos_surface.rs +++ b/ash/src/extensions/macos_surface.rs @@ -43,7 +43,7 @@ impl MacOSSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/mir_surface.rs b/ash/src/extensions/mir_surface.rs index 0281a5f..3f36a1e 100644 --- a/ash/src/extensions/mir_surface.rs +++ b/ash/src/extensions/mir_surface.rs @@ -43,7 +43,7 @@ impl MirSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/surface.rs b/ash/src/extensions/surface.rs index c8db6b6..22e8b23 100644 --- a/ash/src/extensions/surface.rs +++ b/ash/src/extensions/surface.rs @@ -73,7 +73,7 @@ impl Surface { ); v.set_len(count as usize); match err_code { - vk::Result::Success => Ok(v), + vk::Result::SUCCESS => Ok(v), _ => Err(err_code), } } @@ -94,7 +94,7 @@ impl Surface { &mut surface_capabilities, ); match err_code { - vk::Result::Success => Ok(surface_capabilities), + vk::Result::SUCCESS => Ok(surface_capabilities), _ => Err(err_code), } } @@ -122,7 +122,7 @@ impl Surface { ); v.set_len(count as usize); match err_code { - vk::Result::Success => Ok(v), + vk::Result::SUCCESS => Ok(v), _ => Err(err_code), } } diff --git a/ash/src/extensions/swapchain.rs b/ash/src/extensions/swapchain.rs index 7d120bd..2488d6e 100644 --- a/ash/src/extensions/swapchain.rs +++ b/ash/src/extensions/swapchain.rs @@ -60,7 +60,7 @@ impl Swapchain { &mut index, ); match err_code { - vk::Result::Success => Ok(index), + vk::Result::SUCCESS => Ok(index), _ => Err(err_code), } } @@ -78,7 +78,7 @@ impl Swapchain { &mut swapchain, ); match err_code { - vk::Result::Success => Ok(swapchain), + vk::Result::SUCCESS => Ok(swapchain), _ => Err(err_code), } } @@ -90,7 +90,7 @@ impl Swapchain { ) -> VkResult<()> { let err_code = self.swapchain_fn.queue_present_khr(queue, create_info); match err_code { - vk::Result::Success => Ok(()), + vk::Result::SUCCESS => Ok(()), _ => Err(err_code), } } @@ -117,7 +117,7 @@ impl Swapchain { ); v.set_len(count as vk::size_t); match err_code { - vk::Result::Success => Ok(v), + vk::Result::SUCCESS => Ok(v), _ => Err(err_code), } } diff --git a/ash/src/extensions/wayland_surface.rs b/ash/src/extensions/wayland_surface.rs index 6c96fcc..e98e173 100644 --- a/ash/src/extensions/wayland_surface.rs +++ b/ash/src/extensions/wayland_surface.rs @@ -43,7 +43,7 @@ impl WaylandSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/win32_surface.rs b/ash/src/extensions/win32_surface.rs index e24404f..365326d 100644 --- a/ash/src/extensions/win32_surface.rs +++ b/ash/src/extensions/win32_surface.rs @@ -43,7 +43,7 @@ impl Win32Surface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/xcb_surface.rs b/ash/src/extensions/xcb_surface.rs index e3906e3..2ff3f76 100644 --- a/ash/src/extensions/xcb_surface.rs +++ b/ash/src/extensions/xcb_surface.rs @@ -43,7 +43,7 @@ impl XcbSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/extensions/xlib_surface.rs b/ash/src/extensions/xlib_surface.rs index cc4c1da..1f89c1a 100644 --- a/ash/src/extensions/xlib_surface.rs +++ b/ash/src/extensions/xlib_surface.rs @@ -43,7 +43,7 @@ impl XlibSurface { &mut surface, ); match err_code { - vk::Result::Success => Ok(surface), + vk::Result::SUCCESS => Ok(surface), _ => Err(err_code), } } diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 53406b0..834835b 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -82,7 +82,7 @@ pub trait InstanceV1_0 { allocation_callbacks.as_raw_ptr(), &mut device, ); - if err_code != vk::Result::Success { + if err_code != vk::Result::SUCCESS { return Err(DeviceError::VkError(err_code)); } let device_fn = <::Fp as FunctionPointers>::DeviceFp::load( @@ -141,7 +141,7 @@ pub trait InstanceV1_0 { flags, &mut image_format_prop, ); - if err_code == vk::Result::Success { + if err_code == vk::Result::SUCCESS { Ok(image_format_prop) } else { Err(err_code) @@ -220,7 +220,7 @@ pub trait InstanceV1_0 { ); physical_devices.set_len(num as usize); match err_code { - vk::Result::Success => Ok(physical_devices), + vk::Result::SUCCESS => Ok(physical_devices), _ => Err(err_code), } } @@ -247,7 +247,7 @@ pub trait InstanceV1_0 { ); data.set_len(num as usize); match err_code { - vk::Result::Success => Ok(data), + vk::Result::SUCCESS => Ok(data), _ => Err(err_code), } }