Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaun committed Aug 2, 2018
1 parent d2b2c10 commit 9e06734
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions futures-util/src/compat/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub type ExecutorFuture01 = Compat<NeverError<FutureObj<'static, ()>>, BoxedExec
pub trait Executor01CompatExt: Executor01<ExecutorFuture01>
+ Clone + Send + 'static
{
/// Creates an exector compatable with futures 0.3.
/// Creates an `Executor` compatable with futures 0.3.
fn compat(self) -> CompatExecutor<Self>
where Self: Sized;
}
Expand All @@ -39,7 +39,7 @@ where E: Executor01<ExecutorFuture01>,
}
}

/// Converts `futures 0.1` Executors into `futures 0.3` Executors
/// Converts a futures 0.1 `Executor` into a futures 0.3 `Executor`.
#[derive(Clone)]
pub struct CompatExecutor<E> {
exec: E
Expand All @@ -63,7 +63,7 @@ impl<E> Executor03 for CompatExecutor<E>
let fut = exec_err.into_future().into_inner().unwrap_or_else(|_| ());
SpawnObjError {
kind: SpawnErrorKind::shutdown(),
task: Box::new(fut).into(),
future: Box::new(fut).into(),
}
})
}
Expand Down
5 changes: 3 additions & 2 deletions futures-util/src/compat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ impl Wake for Current {
}
}

/// Extension trait for futures 0.1.
/// Extension trait for futures 0.1 Futures.
pub trait Future01Ext: Future01 {
/// Converts the future into a futures 0.3 future.
/// Converts a futures 0.1 `Future<Item = T, Error = E>` into a
/// futures 0.3 `Future<Output = Result<T, E>>`.
fn compat(self) -> Compat<Self, ()> where Self: Sized {
Compat {
inner: self,
Expand Down

0 comments on commit 9e06734

Please sign in to comment.