Skip to content

Commit

Permalink
BevyRenet: fix typo in method name in steam functions (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zajozor authored Oct 4, 2023
1 parent e469891 commit 22d02ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bevy_renet/src/steam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub fn client_connected() -> impl FnMut(Option<Res<SteamClientTransport>>) -> bo
}
}

pub fn client_diconnected() -> impl FnMut(Option<Res<SteamClientTransport>>) -> bool {
pub fn client_disconnected() -> impl FnMut(Option<Res<SteamClientTransport>>) -> bool {
|transport| match transport {
Some(transport) => transport.is_disconnected(),
None => true,
Expand All @@ -133,7 +133,7 @@ pub fn client_just_connected() -> impl FnMut(Local<bool>, Option<Res<SteamClient
}
}

pub fn client_just_diconnected() -> impl FnMut(Local<bool>, Option<Res<SteamClientTransport>>) -> bool {
pub fn client_just_disconnected() -> impl FnMut(Local<bool>, Option<Res<SteamClientTransport>>) -> bool {
|mut last_connected: Local<bool>, transport| {
let disconnected = transport.map(|transport| transport.is_disconnected()).unwrap_or(true);

Expand Down
4 changes: 2 additions & 2 deletions bevy_renet/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn client_connected() -> impl FnMut(Option<Res<NetcodeClientTransport>>) ->
}
}

pub fn client_diconnected() -> impl FnMut(Option<Res<NetcodeClientTransport>>) -> bool {
pub fn client_disconnected() -> impl FnMut(Option<Res<NetcodeClientTransport>>) -> bool {
|transport| match transport {
Some(transport) => transport.is_disconnected(),
None => true,
Expand All @@ -135,7 +135,7 @@ pub fn client_just_connected() -> impl FnMut(Local<bool>, Option<Res<NetcodeClie
}
}

pub fn client_just_diconnected() -> impl FnMut(Local<bool>, Option<Res<NetcodeClientTransport>>) -> bool {
pub fn client_just_disconnected() -> impl FnMut(Local<bool>, Option<Res<NetcodeClientTransport>>) -> bool {
|mut last_connected: Local<bool>, transport| {
let disconnected = transport.map(|transport| transport.is_disconnected()).unwrap_or(true);

Expand Down

0 comments on commit 22d02ea

Please sign in to comment.