Skip to content

Commit 7d170ba

Browse files
committed
f sp
1 parent b8e0663 commit 7d170ba

File tree

1 file changed

+8
-8
lines changed
  • lightning-background-processor/src

1 file changed

+8
-8
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,23 +388,23 @@ pub(crate) mod futures_util {
388388
use core::task::{Poll, Waker, RawWaker, RawWakerVTable};
389389
use core::pin::Pin;
390390
use core::marker::Unpin;
391-
pub(crate) struct Selecter<A: Future<Output=()> + Unpin, B: Future<Output=bool> + Unpin> {
391+
pub(crate) struct Selector<A: Future<Output=()> + Unpin, B: Future<Output=bool> + Unpin> {
392392
pub a: A,
393393
pub b: B,
394394
}
395-
pub(crate) enum SelecterOutput {
395+
pub(crate) enum SelectorOutput {
396396
A, B(bool),
397397
}
398398

399-
impl<A: Future<Output=()> + Unpin, B: Future<Output=bool> + Unpin> Future for Selecter<A, B> {
400-
type Output = SelecterOutput;
401-
fn poll(mut self: Pin<&mut Self>, ctx: &mut core::task::Context<'_>) -> Poll<SelecterOutput> {
399+
impl<A: Future<Output=()> + Unpin, B: Future<Output=bool> + Unpin> Future for Selector<A, B> {
400+
type Output = SelectorOutput;
401+
fn poll(mut self: Pin<&mut Self>, ctx: &mut core::task::Context<'_>) -> Poll<SelectorOutput> {
402402
match Pin::new(&mut self.a).poll(ctx) {
403-
Poll::Ready(()) => { return Poll::Ready(SelecterOutput::A); },
403+
Poll::Ready(()) => { return Poll::Ready(SelectorOutput::A); },
404404
Poll::Pending => {},
405405
}
406406
match Pin::new(&mut self.b).poll(ctx) {
407-
Poll::Ready(res) => { return Poll::Ready(SelecterOutput::B(res)); },
407+
Poll::Ready(res) => { return Poll::Ready(SelectorOutput::B(res)); },
408408
Poll::Pending => {},
409409
}
410410
Poll::Pending
@@ -419,7 +419,7 @@ pub(crate) mod futures_util {
419419
pub(crate) fn dummy_waker() -> Waker { unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &DUMMY_WAKER_VTABLE)) } }
420420
}
421421
#[cfg(feature = "futures")]
422-
use futures_util::{Selecter, SelecterOutput, dummy_waker};
422+
use futures_util::{Selector, SelectorOutput, dummy_waker};
423423
#[cfg(feature = "futures")]
424424
use core::task;
425425

0 commit comments

Comments
 (0)