]> git.nega.tv - josh/narcissus/commitdiff
Fix doc comments
authorJoshua Simmons <josh@nega.tv>
Sat, 4 Mar 2023 13:11:49 +0000 (14:11 +0100)
committerJoshua Simmons <josh@nega.tv>
Sat, 4 Mar 2023 13:11:49 +0000 (14:11 +0100)
libs/ffi/vulkan-sys/src/enums.rs
libs/narcissus-core/src/lib.rs
libs/narcissus-core/src/slice.rs

index 2a98f0b979b85eb93f176e6f46b1c76433112aaf..4d8ce08f303e7f3d866b426a4d5a1578235d9a5b 100644 (file)
@@ -21,7 +21,7 @@ pub enum Result {
     ErrorOutOfDeviceMemory = -2,
     ///  Initialization of a object has failed
     ErrorInitializationFailed = -3,
-    ///  The logical device has been lost. See <<devsandqueues-lost-device>>
+    ///  The logical device has been lost.
     ErrorDeviceLost = -4,
     ///  Mapping of a memory object has failed
     ErrorMemoryMapFailed = -5,
index c8e1ad3c61734074a186a93949d4f79151e981c0..b57b5cbdadcc5d0beee0fc30c2aefbd89c73faa9 100644 (file)
@@ -282,7 +282,7 @@ pub fn zeroed_box<T>() -> Box<MaybeUninit<T>> {
 /// is in an initialized state. Calling this when the content is not yet fully initialized causes
 /// immediate undefined behavior.
 ///
-/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
+/// [`MaybeUninit::assume_init`]: std::mem::MaybeUninit::assume_init
 #[inline]
 pub unsafe fn box_assume_init<T>(value: Box<MaybeUninit<T>>) -> Box<T> {
     let raw = Box::into_raw(value);
index 66713a2d53ee6d6eaf0769390e85e03c55c8f480..12ac63100bf6fbd2d613c14e26aa4a767137658a 100644 (file)
@@ -375,11 +375,6 @@ pub fn array_chunks_mut<T, const N: usize>(slice: &mut [T]) -> ArrayChunksMut<'_
 /// This may only be called when
 /// - The slice splits exactly into `N`-element chunks (aka `self.len() % N == 0`).
 /// - `N != 0`.
-///
-/// // These would be unsound:
-/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
-/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
-/// ```
 #[inline]
 #[must_use]
 pub unsafe fn as_chunks_unchecked<T, const N: usize>(slice: &[T]) -> &[[T; N]] {
@@ -419,11 +414,6 @@ pub fn as_chunks<T, const N: usize>(slice: &[T]) -> (&[[T; N]], &[T]) {
 /// This may only be called when
 /// - The slice splits exactly into `N`-element chunks (aka `self.len() % N == 0`).
 /// - `N != 0`.
-///
-/// // These would be unsound:
-/// // let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
-/// // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
-/// ```
 #[inline]
 #[must_use]
 pub unsafe fn as_chunks_unchecked_mut<T, const N: usize>(slice: &mut [T]) -> &mut [[T; N]] {
@@ -443,7 +433,6 @@ pub unsafe fn as_chunks_unchecked_mut<T, const N: usize>(slice: &mut [T]) -> &mu
 ///
 /// Panics if `N` is 0. This check will most probably get changed to a compile time
 /// error before this method gets stabilized.
-/// ```
 #[inline]
 #[must_use]
 pub fn as_chunks_mut<T, const N: usize>(slice: &mut [T]) -> (&mut [[T; N]], &mut [T]) {