Skip to content

Commit

Permalink
Eth: rename is_up to is_connected
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed May 10, 2023
1 parent 4b33ea9 commit 7322c1f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub trait Eth {
fn stop(&mut self) -> Result<(), Self::Error>;

fn is_started(&self) -> Result<bool, Self::Error>;
fn is_up(&self) -> Result<bool, Self::Error>;
fn is_connected(&self) -> Result<bool, Self::Error>;
}

impl<E> Eth for &mut E
Expand All @@ -28,8 +28,8 @@ where
(**self).is_started()
}

fn is_up(&self) -> Result<bool, Self::Error> {
(**self).is_up()
fn is_connected(&self) -> Result<bool, Self::Error> {
(**self).is_connected()
}
}

Expand All @@ -54,15 +54,15 @@ pub mod asynch {
where
Self: 'a;

type IsUpFuture<'a>: Future<Output = Result<bool, Self::Error>>
type IsConnectedFuture<'a>: Future<Output = Result<bool, Self::Error>>
where
Self: 'a;

fn start(&mut self) -> Self::StartFuture<'_>;
fn stop(&mut self) -> Self::StopFuture<'_>;

fn is_started(&self) -> Self::IsStartedFuture<'_>;
fn is_up(&self) -> Self::IsUpFuture<'_>;
fn is_connected(&self) -> Self::IsConnectedFuture<'_>;
}

impl<E> Eth for &mut E
Expand All @@ -83,7 +83,7 @@ pub mod asynch {
where
Self: 'a;

type IsUpFuture<'a> = E::IsUpFuture<'a>
type IsConnectedFuture<'a> = E::IsConnectedFuture<'a>
where
Self: 'a;

Expand All @@ -99,8 +99,8 @@ pub mod asynch {
(**self).is_started()
}

fn is_up(&self) -> Self::IsUpFuture<'_> {
(**self).is_up()
fn is_connected(&self) -> Self::IsConnectedFuture<'_> {
(**self).is_connected()
}
}
}

0 comments on commit 7322c1f

Please sign in to comment.