From 9724e0974f2b160153ed137151a0e9f3cad35c3c Mon Sep 17 00:00:00 2001 From: Firestar99 <31222740+Firestar99@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:22:10 +0200 Subject: [PATCH] small Buffer docs fixes (#2328) * fixed Buffer::new* docs still referring to buffer_info instead of create_info * fixed line length --------- Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com> --- vulkano/src/buffer/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vulkano/src/buffer/mod.rs b/vulkano/src/buffer/mod.rs index efba5370a7..5b4605e693 100644 --- a/vulkano/src/buffer/mod.rs +++ b/vulkano/src/buffer/mod.rs @@ -305,7 +305,7 @@ impl Buffer { /// /// # Panics /// - /// - Panics if `buffer_info.size` is not zero. + /// - Panics if `create_info.size` is not zero. pub fn new_sized( allocator: Arc, create_info: BufferCreateInfo, @@ -330,7 +330,7 @@ impl Buffer { /// /// # Panics /// - /// - Panics if `buffer_info.size` is not zero. + /// - Panics if `create_info.size` is not zero. /// - Panics if `len` is zero. pub fn new_slice( allocator: Arc, @@ -349,7 +349,7 @@ impl Buffer { /// /// # Panics /// - /// - Panics if `buffer_info.size` is not zero. + /// - Panics if `create_info.size` is not zero. /// - Panics if `len` is zero. pub fn new_unsized( allocator: Arc, @@ -376,7 +376,7 @@ impl Buffer { /// /// # Panics /// - /// - Panics if `buffer_info.size` is not zero. + /// - Panics if `create_info.size` is not zero. /// - Panics if `layout.alignment()` is greater than 64. pub fn new( allocator: Arc, @@ -388,10 +388,10 @@ impl Buffer { // TODO: Enable once sparse binding materializes // assert!(!allocate_info.flags.contains(BufferCreateFlags::SPARSE_BINDING)); - assert!( - create_info.size == 0, - "`Buffer::new*` functions set the `buffer_info.size` field themselves, you should not \ - set it yourself", + assert_eq!( + create_info.size, 0, + "`Buffer::new*` functions set the `create_info.size` field themselves, you should not \ + set it yourself" ); create_info.size = layout.size();