aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-07-26 20:37:06 -0700
committerZeyla Hellyer <[email protected]>2017-07-26 20:37:06 -0700
commit49aabe99ff573db5216e1b180aa1a015b8f11eae (patch)
tree98ec23f89d50572a7311c33d5337b3671c0bf188 /src/internal
parentMake the `framework` module feature-gated and fix the names in the helper macro (diff)
downloadserenity-49aabe99ff573db5216e1b180aa1a015b8f11eae.tar.xz
serenity-49aabe99ff573db5216e1b180aa1a015b8f11eae.zip
Use a consistent indentation style
This project has - in the past - used an indentation style of 4 spaces, without trailing whitespace. This commit modifies lines with tab indentation to 4 spaces. Whether to use tabs or spaces is up to the current maintainer, but consistency avoids files eventually being completely mixed styles.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/ws_impl.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/internal/ws_impl.rs b/src/internal/ws_impl.rs
index 8366a23..573c4e6 100644
--- a/src/internal/ws_impl.rs
+++ b/src/internal/ws_impl.rs
@@ -17,12 +17,12 @@ pub trait SenderExt {
impl ReceiverExt for WsClient<TlsStream<TcpStream>> {
fn recv_json<F, T>(&mut self, decode: F) -> Result<T> where F: FnOnce(Value) -> Result<T> {
- let message = self.recv_message()?;
-
- if let OwnedMessage::Ping(ref x) = message {
- self.send_message(&OwnedMessage::Pong(x.clone())).map_err(Error::from)?;
- }
-
+ let message = self.recv_message()?;
+
+ if let OwnedMessage::Ping(ref x) = message {
+ self.send_message(&OwnedMessage::Pong(x.clone())).map_err(Error::from)?;
+ }
+
let res = match message {
OwnedMessage::Binary(bytes) => {
let value = serde_json::from_reader(ZlibDecoder::new(&bytes[..]))?;
@@ -49,8 +49,8 @@ impl ReceiverExt for WsClient<TlsStream<TcpStream>> {
},
OwnedMessage::Ping(..) | OwnedMessage::Pong(..) => None,
};
-
- res.unwrap()
+
+ res.unwrap()
}
}