Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
radstevee committed Dec 27, 2024
1 parent f88ec8f commit dfa71d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/commands/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl CommandInput {
let mut i = 0;
while i < max_spaces
&& self.has_remaining_input()
&& self.peek().map_or(false, |c| c.is_whitespace())
&& self.peek().is_some_and(|c| c.is_whitespace())
{
self.read(1);
i += 1;
Expand Down
4 changes: 1 addition & 3 deletions src/lib/net/src/packets/incoming/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ impl IncomingPacket for ChatCommandPacket {
let mut writer = state.universe.get_mut::<StreamWriter>(conn_id)?;

let command = find_command(self.command.as_str());
if let None = command {
// invalid command TwT, we send a message that the given command
// could not be found.
if command.is_none() {
writer
.send_packet(
&SystemMessagePacket::new(
Expand Down

0 comments on commit dfa71d8

Please sign in to comment.