@@ -1076,8 +1076,9 @@ pub fn uninit<T, E>() -> impl Init<MaybeUninit<T>, E> {
1076
1076
/// ```rust
1077
1077
/// use kernel::{alloc::KBox, error::Error, init::init_array_from_fn};
1078
1078
/// let array: KBox<[usize; 1_000]> =
1079
- /// KBox::init::<Error>(init_array_from_fn(|i| i), GFP_KERNEL).unwrap() ;
1079
+ /// KBox::init::<Error>(init_array_from_fn(|i| i), GFP_KERNEL)? ;
1080
1080
/// assert_eq!(array.len(), 1_000);
1081
+ /// # Ok::<(), Error>(())
1081
1082
/// ```
1082
1083
pub fn init_array_from_fn < I , const N : usize , T , E > (
1083
1084
mut make_init : impl FnMut ( usize ) -> I ,
@@ -1120,8 +1121,9 @@ where
1120
1121
/// ```rust
1121
1122
/// use kernel::{sync::{Arc, Mutex}, init::pin_init_array_from_fn, new_mutex};
1122
1123
/// let array: Arc<[Mutex<usize>; 1_000]> =
1123
- /// Arc::pin_init(pin_init_array_from_fn(|i| new_mutex!(i)), GFP_KERNEL).unwrap() ;
1124
+ /// Arc::pin_init(pin_init_array_from_fn(|i| new_mutex!(i)), GFP_KERNEL)? ;
1124
1125
/// assert_eq!(array.len(), 1_000);
1126
+ /// # Ok::<(), Error>(())
1125
1127
/// ```
1126
1128
pub fn pin_init_array_from_fn < I , const N : usize , T , E > (
1127
1129
mut make_init : impl FnMut ( usize ) -> I ,
0 commit comments