@@ -20,7 +20,7 @@ pub fn consume_timeslice(env: Env, percent: i32) -> bool {
20
20
#[ macro_export]
21
21
macro_rules! reschedule {
22
22
( $flags: expr, $( $arg: expr) ,* ) => (
23
- rustler:: schedule :: Schedule :: from( ( $flags, $( $arg, ) * ) )
23
+ rustler:: Schedule :: from( ( $flags, $( $arg, ) * ) )
24
24
)
25
25
}
26
26
@@ -40,16 +40,16 @@ macro_rules! reschedule {
40
40
/// ## Example:
41
41
/// ```rust,ignore
42
42
/// #[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> > {
44
44
/// let result = result.unwrap_or(1);
45
45
/// if input == 0 {
46
46
/// Schedule::Return(result)
47
47
/// } 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) )
53
53
/// }
54
54
/// }
55
55
/// ```
0 commit comments