From 609786ed4151e7880f3d6bada8b0575c57a63902 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Fri, 9 Feb 2018 11:32:38 -0800 Subject: [PATCH] Remove fn that was never intended to be pub (#130) This function could not be called from a public setting in the first place due to the argument types being private. --- src/executor/current_thread.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/executor/current_thread.rs b/src/executor/current_thread.rs index edc011ed7..cc0d3d2de 100644 --- a/src/executor/current_thread.rs +++ b/src/executor/current_thread.rs @@ -130,15 +130,14 @@ where F: FnOnce(&mut Context) -> R }) } -/// Calls the given closure with a custom sleep strategy. -/// -/// This function is the same as `run` except that it allows customizing the -/// sleep strategy. -pub fn run_with_sleep(sleep: &mut S, f: F) -> R +#[deprecated(since = "0.1.1", note = "this was never supposed to be public")] +#[doc(hidden)] +pub fn run_with_sleep(_: &mut S, _: F) -> R where F: FnOnce(&mut Context) -> R, S: Sleep, { - TaskRunner::enter(sleep, f) + // This could never be called publically because `Sleep` is not public. + unimplemented!(); } /// Executes a future on the current thread.