Skip to content

Commit bd0dc35

Browse files
committed
rework Debug requirement
1 parent d9fc247 commit bd0dc35

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

src/runtime.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::{AsyncIOHandle, Executor, IOHandle, Reactor, RuntimeKit, Task, sys::I
22
use async_trait::async_trait;
33
use futures_core::Stream;
44
use std::{
5-
fmt::Debug,
5+
fmt,
66
future::Future,
77
io,
88
net::SocketAddr,
@@ -63,7 +63,10 @@ impl<E: Executor, R: Reactor> RuntimeParts<E, R> {
6363
}
6464
}
6565

66-
impl<E: Executor + Sync, R: Reactor + Sync> RuntimeKit for RuntimeParts<E, R> {}
66+
impl<E: Executor + Sync + fmt::Debug, R: Reactor + Sync + fmt::Debug> RuntimeKit
67+
for RuntimeParts<E, R>
68+
{
69+
}
6770

6871
impl<E: Executor, R: Reactor> Executor for RuntimeParts<E, R> {
6972
fn block_on<T>(&self, f: Pin<Box<dyn Future<Output = T>>>) -> T {

src/traits/executor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! A collection of traits to define a common interface across executors
22
33
use async_trait::async_trait;
4-
use std::{fmt::Debug, future::Future, ops::Deref, pin::Pin};
4+
use std::{future::Future, ops::Deref, pin::Pin};
55

66
/// A common interface for spawning futures on top of an executor
7-
pub trait Executor: Debug {
7+
pub trait Executor {
88
/// Block on a future until completion
99
fn block_on<T>(&self, f: Pin<Box<dyn Future<Output = T>>>) -> T
1010
where
@@ -24,7 +24,7 @@ pub trait Executor: Debug {
2424
Self: Sized;
2525
}
2626

27-
impl<E: Deref + Debug> Executor for E
27+
impl<E: Deref> Executor for E
2828
where
2929
E::Target: Executor + Sized,
3030
{

src/traits/reactor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use sys::IO;
1313

1414
/// A common interface for performing actions on a reactor
1515
#[async_trait]
16-
pub trait Reactor: fmt::Debug {
16+
pub trait Reactor {
1717
/// Register a synchronous handle, returning an asynchronous one
1818
fn register<H: IO + Send + 'static>(
1919
&self,

src/traits/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
use crate::{Executor, Reactor};
22

33
/// Supertrait to tag a type that implements all required components for a Runtime
4-
pub trait RuntimeKit: Executor + Reactor {}
4+
pub trait RuntimeKit: Executor + Reactor + std::fmt::Debug {}

0 commit comments

Comments
 (0)