From 7a8bbe78908a84ce0e5f99944b9a04da08312835 Mon Sep 17 00:00:00 2001 From: rasul Date: Sat, 4 Apr 2020 11:20:29 -0500 Subject: [PATCH] rustfmt --- src/command/set/room/description/delete.rs | 2 +- src/command/set/room/description/description.rs | 8 ++++++-- src/command/set/room/room.rs | 2 +- src/game/iter_once.rs | 2 -- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/command/set/room/description/delete.rs b/src/command/set/room/description/delete.rs index 5ddbd80..e00fdba 100644 --- a/src/command/set/room/description/delete.rs +++ b/src/command/set/room/description/delete.rs @@ -34,7 +34,7 @@ impl CommandSetRoomDescription { } // remove the line and save - room.description.remove(line_num-1); + room.description.remove(line_num - 1); let _ = try_send_error!(token, db.save_room(&room)); SendQueue::ok(token) diff --git a/src/command/set/room/description/description.rs b/src/command/set/room/description/description.rs index 2af9a0b..95d1fbf 100644 --- a/src/command/set/room/description/description.rs +++ b/src/command/set/room/description/description.rs @@ -23,8 +23,12 @@ impl Default for CommandSetRoomDescription { impl Parse for CommandSetRoomDescription { fn help(&self) -> &str { match self { - Self::Delete => "set room description delete LINE :: Delete line LINE from room description", - Self::Set => "set room description set LINE DESC :: Set room description line LINE to DESC", + Self::Delete => { + "set room description delete LINE :: Delete line LINE from room description" + } + Self::Set => { + "set room description set LINE DESC :: Set room description line LINE to DESC" + } Self::Default => "", } } diff --git a/src/command/set/room/room.rs b/src/command/set/room/room.rs index 46a0860..948c638 100644 --- a/src/command/set/room/room.rs +++ b/src/command/set/room/room.rs @@ -34,7 +34,7 @@ impl Parse for CommandSetRoom { Self::Description(_) => { let (command, args) = CommandSetRoomDescription::parse(s)?; Ok((Self::Description(command), args)) - }, + } Self::Default => Err(ParserError::Default), _ => Ok((self.clone(), s)), } diff --git a/src/game/iter_once.rs b/src/game/iter_once.rs index 9ed739b..03cc114 100644 --- a/src/game/iter_once.rs +++ b/src/game/iter_once.rs @@ -21,8 +21,6 @@ impl Game { send_queue.append(&mut queue); } - - // send everything in the send queue while let Some((token, message, prompt)) = send_queue.pop() { // get the client