Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix spelling for EventLoop #935

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rumqttc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,21 +450,21 @@ impl Connection {
Iter { connection: self }
}

/// Attempt to fetch an incoming [`Event`] on the [`EvenLoop`], returning an error
/// Attempt to fetch an incoming [`Event`] on the [`EventLoop`], returning an error
/// if all clients/users have closed requests channel.
///
/// [`EvenLoop`]: super::EventLoop
/// [`EventLoop`]: super::EventLoop
pub fn recv(&mut self) -> Result<Result<Event, ConnectionError>, RecvError> {
let f = self.eventloop.poll();
let event = self.runtime.block_on(f);

resolve_event(event).ok_or(RecvError)
}

/// Attempt to fetch an incoming [`Event`] on the [`EvenLoop`], returning an error
/// Attempt to fetch an incoming [`Event`] on the [`EventLoop`], returning an error
/// if none immediately present or all clients/users have closed requests channel.
///
/// [`EvenLoop`]: super::EventLoop
/// [`EventLoop`]: super::EventLoop
pub fn try_recv(&mut self) -> Result<Result<Event, ConnectionError>, TryRecvError> {
let f = self.eventloop.poll();
// Enters the runtime context so we can poll the future, as required by `now_or_never()`.
Expand All @@ -475,10 +475,10 @@ impl Connection {
resolve_event(event).ok_or(TryRecvError::Disconnected)
}

/// Attempt to fetch an incoming [`Event`] on the [`EvenLoop`], returning an error
/// Attempt to fetch an incoming [`Event`] on the [`EventLoop`], returning an error
/// if all clients/users have closed requests channel or the timeout has expired.
///
/// [`EvenLoop`]: super::EventLoop
/// [`EventLoop`]: super::EventLoop
pub fn recv_timeout(
&mut self,
duration: Duration,
Expand Down
12 changes: 6 additions & 6 deletions rumqttc/src/v5/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,21 +798,21 @@ impl Connection {
Iter { connection: self }
}

/// Attempt to fetch an incoming [`Event`] on the [`EvenLoop`], returning an error
/// Attempt to fetch an incoming [`Event`] on the [`EventLoop`], returning an error
/// if all clients/users have closed requests channel.
///
/// [`EvenLoop`]: super::EventLoop
/// [`EventLoop`]: super::EventLoop
pub fn recv(&mut self) -> Result<Result<Event, ConnectionError>, RecvError> {
let f = self.eventloop.poll();
let event = self.runtime.block_on(f);

resolve_event(event).ok_or(RecvError)
}

/// Attempt to fetch an incoming [`Event`] on the [`EvenLoop`], returning an error
/// Attempt to fetch an incoming [`Event`] on the [`EventLoop`], returning an error
/// if none immediately present or all clients/users have closed requests channel.
///
/// [`EvenLoop`]: super::EventLoop
/// [`EventLoop`]: super::EventLoop
pub fn try_recv(&mut self) -> Result<Result<Event, ConnectionError>, TryRecvError> {
let f = self.eventloop.poll();
// Enters the runtime context so we can poll the future, as required by `now_or_never()`.
Expand All @@ -823,10 +823,10 @@ impl Connection {
resolve_event(event).ok_or(TryRecvError::Disconnected)
}

/// Attempt to fetch an incoming [`Event`] on the [`EvenLoop`], returning an error
/// Attempt to fetch an incoming [`Event`] on the [`EventLoop`], returning an error
/// if all clients/users have closed requests channel or the timeout has expired.
///
/// [`EvenLoop`]: super::EventLoop
/// [`EventLoop`]: super::EventLoop
pub fn recv_timeout(
&mut self,
duration: Duration,
Expand Down