@@ -20,7 +20,7 @@ pub fn consume_timeslice(env: Env, percent: i32) -> bool {
2020#[ macro_export]
2121macro_rules! reschedule {
2222 ( $flags: expr, $( $arg: expr) ,* ) => (
23- rustler:: schedule :: Schedule :: from( ( $flags, $( $arg, ) * ) )
23+ rustler:: Schedule :: from( ( $flags, $( $arg, ) * ) )
2424 )
2525}
2626
@@ -40,16 +40,16 @@ macro_rules! reschedule {
4040/// ## Example:
4141/// ```rust,ignore
4242/// #[nif]
43- /// fn factorial(input: u32 , result: Option<u32>) -> Schedule<factorial, u32, u32, u32> {
43+ /// fn factorial(input: u8 , result: Option<u32>) -> Schedule<factorial, u32, u8, Option< u32> > {
4444/// let result = result.unwrap_or(1);
4545/// if input == 0 {
4646/// Schedule::Return(result)
4747/// } else {
48- /// // alternatively `Schedule::Continue2(std::marker::PhantomData, SchedulerFlags::Normal, input - 1, result * input)`
49- /// // alternatively `Schedule::continue2(SchedulerFlags::Normal, input - 1, result * input)`
50- /// // alternatively `Schedule::from((SchedulerFlags::Normal, input - 1, result * input))`
51- /// // alternatively `(SchedulerFlags::Normal, input - 1, result * input).into()`
52- /// reschedule!(SchedulerFlags::Normal, input - 1, result * input)
48+ /// // alternatively `Schedule::Continue2(std::marker::PhantomData, SchedulerFlags::Normal, input - 1, Some( result * input as u32) )`
49+ /// // or `Schedule::continue2(SchedulerFlags::Normal, input - 1, Some( result * input as u32) )`
50+ /// // or `Schedule::from((SchedulerFlags::Normal, input - 1, Some( result * input as u32) ))`
51+ /// // or `(SchedulerFlags::Normal, input - 1, Some( result * input as u32) ).into()`
52+ /// reschedule!(SchedulerFlags::Normal, input - 1, Some( result * input as u32) )
5353/// }
5454/// }
5555/// ```
0 commit comments