diff --git a/mco-gen/src/gen_impl.rs b/mco-gen/src/gen_impl.rs index 58daa92..eb540e8 100644 --- a/mco-gen/src/gen_impl.rs +++ b/mco-gen/src/gen_impl.rs @@ -236,7 +236,7 @@ impl Gn { Generator { gen } } - pub fn new_opt2<'a, T: Any, F>(size: usize, f: F,stack:Stack) -> Generator<'a, A, T> + pub fn new_opt_stack<'a, T: Any, F>( f: F,stack:Stack) -> Generator<'a, A, T> where F: FnOnce() -> T + Send + 'a, { diff --git a/src/coroutine_impl.rs b/src/coroutine_impl.rs index 879e859..99ec320 100644 --- a/src/coroutine_impl.rs +++ b/src/coroutine_impl.rs @@ -324,7 +324,7 @@ impl Builder { let mut co = CoroutineImpl { worker_thread_id: None, - inner: Gn::new_opt2(stack_size, closure, Stack::new(2048)), + inner: Gn::new_opt_stack(closure, Stack::new(2048)), reduce: None, };