Skip to content

Commit e686e6e

Browse files
committed
Change some associated future trait type names
1 parent c002a23 commit e686e6e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/futures/digital.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use core::future::Future;
4242
/// Asynchronously wait for a pin to be high.
4343
pub trait WaitForHigh {
4444
/// The future returned by the `wait_for_high` function.
45-
type WaitForHigh<'a>: Future<Output=()> + 'a
45+
type HighFuture<'a>: Future<Output=()> + 'a
4646
where
4747
Self: 'a;
4848

@@ -52,13 +52,13 @@ pub trait WaitForHigh {
5252
/// # Note for implementers
5353
/// The pin may have switched back to low before the task was run after
5454
/// being woken. The future should still resolve in that case.
55-
fn wait_for_high<'a>(&'a mut self) -> Self::WaitForHigh<'a>;
55+
fn wait_for_high<'a>(&'a mut self) -> Self::HighFuture<'a>;
5656
}
5757

5858
/// Asynchronously wait for a pin to be low.
5959
pub trait WaitForLow {
6060
/// The future returned by `wait_for_low`.
61-
type WaitForLow<'a>: Future<Output = ()> + 'a
61+
type LowFuture<'a>: Future<Output = ()> + 'a
6262
where
6363
Self: 'a;
6464

@@ -68,39 +68,39 @@ pub trait WaitForLow {
6868
/// # Note for implementers
6969
/// The pin may have switched back to high before the task was run after
7070
/// being woken. The future should still resolve in that case.
71-
fn wait_for_low<'a>(&'a mut self) -> Self::WaitForLow<'a>;
71+
fn wait_for_low<'a>(&'a mut self) -> Self::LowFuture<'a>;
7272
}
7373

7474
/// Wait for a rising edge (transition from low to high).
7575
pub trait WaitForRisingEdge {
7676
/// The future returned from `wait_for_rising_edge`.
77-
type WaitForRisingEdgeFuture<'a>: Future<Output = ()> + 'a
77+
type RisingFuture<'a>: Future<Output = ()> + 'a
7878
where
7979
Self: 'a;
8080

8181
/// Returns a future that resolves when this pin transitions from low to high.
82-
fn wait_for_rising_edge<'a>(&'a mut self) -> Self::WaitForRisingEdgeFuture<'a>;
82+
fn wait_for_rising_edge<'a>(&'a mut self) -> Self::RisingFuture<'a>;
8383
}
8484

8585
/// Wait for a falling edge (transition from high to low).
8686
pub trait WaitForFallingEdge {
8787
/// The future returned from `wait_for_falling_edge`.
88-
type WaitForFallingEdgeFuture<'a>: Future<Output = ()> + 'a
88+
type FallingFuture<'a>: Future<Output = ()> + 'a
8989
where
9090
Self: 'a;
9191

9292
/// Returns a future that resolves when this pin transitions from high to low.
93-
fn wait_for_falling_edge<'a>(&'a mut self) -> Self::WaitForFallingEdgeFuture<'a>;
93+
fn wait_for_falling_edge<'a>(&'a mut self) -> Self::FallingFuture<'a>;
9494
}
9595

9696
/// Wait for any edge (transition from low to high OR high to low).
9797
pub trait WaitForAnyEdge {
9898
/// The future returned from `wait_for_any_edge`.
99-
type WaitForAnyEdgeFuture<'a>: Future<Output = ()> + 'a
99+
type EdgeFuture<'a>: Future<Output = ()> + 'a
100100
where
101101
Self: 'a;
102102

103103
/// Returns a future that resolves when this pin undergoes any transition, e.g.
104104
/// low to high OR high to low.
105-
fn wait_for_any_edge<'a>(&'a mut self) -> Self::WaitForAnyEdgeFuture<'a>;
105+
fn wait_for_any_edge<'a>(&'a mut self) -> Self::EdgeFuture<'a>;
106106
}

0 commit comments

Comments
 (0)