Fix Rust 1.76 clippy warnings (#2462)

* Fix Rust 1.76 clippy warnings

* Fix doctest error
This commit is contained in:
Rua 2024-02-15 16:39:02 +01:00 committed by GitHub
parent 97d81c3689
commit 8673aea5d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 9 deletions

View File

@ -408,11 +408,10 @@ impl<'a> Frame<'a> {
pub fn next_pass<'f>(&'f mut self) -> Option<Pass<'f, 'a>> { pub fn next_pass<'f>(&'f mut self) -> Option<Pass<'f, 'a>> {
// This function reads `num_pass` increments its value, and returns a struct corresponding // This function reads `num_pass` increments its value, and returns a struct corresponding
// to that pass that the user will be able to manipulate in order to customize the pass. // to that pass that the user will be able to manipulate in order to customize the pass.
match {
let current_pass = self.num_pass; let current_pass = self.num_pass;
self.num_pass += 1; self.num_pass += 1;
current_pass
} { match current_pass {
0 => { 0 => {
// If we are in the pass 0 then we haven't start anything yet. // If we are in the pass 0 then we haven't start anything yet.
// We already called `begin_render_pass` (in the `frame()` method), and that's the // We already called `begin_render_pass` (in the `frame()` method), and that's the

View File

@ -23,10 +23,9 @@ use winit::{
/// }; /// };
/// use winit::event_loop::EventLoop; /// use winit::event_loop::EventLoop;
/// ///
/// #[test]
/// fn test() { /// fn test() {
/// let context = VulkanoContext::new(VulkanoConfig::default()); /// let context = VulkanoContext::new(VulkanoConfig::default());
/// let event_loop = EventLoop::new(); /// let event_loop = EventLoop::new().unwrap();
/// let mut vulkano_windows = VulkanoWindows::default(); /// let mut vulkano_windows = VulkanoWindows::default();
/// let _id1 = /// let _id1 =
/// vulkano_windows.create_window(&event_loop, &context, &Default::default(), |_| {}); /// vulkano_windows.create_window(&event_loop, &context, &Default::default(), |_| {});

View File

@ -251,7 +251,7 @@ impl RecordingCommandBuffer {
/// ///
/// See also [`get_results`]. /// See also [`get_results`].
/// ///
/// [`query_pool.ty().result_len()`]: crate::query::QueryType::result_len /// [`query_pool.ty().result_len()`]: crate::query::QueryPool::result_len
/// [`QueryResultFlags::WITH_AVAILABILITY`]: crate::query::QueryResultFlags::WITH_AVAILABILITY /// [`QueryResultFlags::WITH_AVAILABILITY`]: crate::query::QueryResultFlags::WITH_AVAILABILITY
/// [`get_results`]: crate::query::QueryPool::get_results /// [`get_results`]: crate::query::QueryPool::get_results
pub fn copy_query_pool_results<T>( pub fn copy_query_pool_results<T>(

View File

@ -168,7 +168,7 @@ impl QueryPool {
/// ///
/// See also [`copy_query_pool_results`]. /// See also [`copy_query_pool_results`].
/// ///
/// [`self.ty().result_len()`]: QueryType::result_len /// [`self.ty().result_len()`]: QueryPool::result_len
/// [`WITH_AVAILABILITY`]: QueryResultFlags::WITH_AVAILABILITY /// [`WITH_AVAILABILITY`]: QueryResultFlags::WITH_AVAILABILITY
/// [`copy_query_pool_results`]: crate::command_buffer::RecordingCommandBuffer::copy_query_pool_results /// [`copy_query_pool_results`]: crate::command_buffer::RecordingCommandBuffer::copy_query_pool_results
#[inline] #[inline]