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

Renet: fix typos and improve documentation in error enums #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions renet/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::packet::SerializationError;
pub enum DisconnectReason {
/// Connection was terminated by the transport layer
Transport,
/// Connection was terminated by the server
/// Connection was terminated by the client
DisconnectedByClient,
/// Connection was terminated by the server
DisconnectedByServer,
Expand All @@ -23,7 +23,7 @@ pub enum DisconnectReason {
ReceiveChannelError { channel_id: u8, error: ChannelError },
}

/// Possibles errors that can occur in a channel.
/// Possible errors that can occur in a channel.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ChannelError {
/// Reliable channel reached maximum allowed memory
Expand All @@ -37,8 +37,8 @@ impl fmt::Display for ChannelError {
use ChannelError::*;

match *self {
ReliableChannelMaxMemoryReached => write!(fmt, "reliable channel memory usage was exausted"),
InvalidSliceMessage => write!(fmt, "received an invalid slice packet"),
ReliableChannelMaxMemoryReached => write!(fmt, "reliable channel memory usage was exhausted"),
InvalidSliceMessage => write!(fmt, "received an invalid slice message"),
}
}
}
Expand Down Expand Up @@ -69,6 +69,6 @@ impl std::error::Error for ClientNotFound {}

impl fmt::Display for ClientNotFound {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
write!(fmt, "client with given id was not found")
write!(fmt, "client with the given id was not found")
}
}