aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-16 00:19:19 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-16 00:19:19 -0400
commitb0a488a351ac1c7dbf21e2231a8b553e124aee60 (patch)
tree614920018e209a4a3b3c5897ec28f5a2e31132fa
parent8a11aa77f47d455f5167cb2046acc59c2b967bb1 (diff)
downloadteleterm-b0a488a351ac1c7dbf21e2231a8b553e124aee60.tar.gz
teleterm-b0a488a351ac1c7dbf21e2231a8b553e124aee60.zip
rename some enum variants
more consistency with the server side
-rw-r--r--src/client.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client.rs b/src/client.rs
index 4bb2776..ca94623 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -16,7 +16,7 @@ enum ReadSocket<
> {
NotConnected,
Connected(crate::protocol::FramedReadHalf<S>),
- ReadingMessage(
+ Reading(
Box<
dyn futures::future::Future<
Item = (
@@ -42,7 +42,7 @@ enum WriteSocket<
>,
),
Connected(crate::protocol::FramedWriteHalf<S>),
- WritingMessage(
+ Writing(
Box<
dyn futures::future::Future<
Item = crate::protocol::FramedWriteHalf<S>,
@@ -417,7 +417,7 @@ impl<S: tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + 'static>
// actually connected, so it'd just be spammy
}
},
- WriteSocket::Connected(..) | WriteSocket::WritingMessage(..) => {
+ WriteSocket::Connected(..) | WriteSocket::Writing(..) => {
if self.has_seen_server_recently() {
return Ok(crate::component_future::Poll::NothingToDo);
} else {
@@ -445,13 +445,13 @@ impl<S: tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + 'static>
ReadSocket::NotConnected,
) {
let fut = crate::protocol::Message::read_async(s);
- self.rsock = ReadSocket::ReadingMessage(Box::new(fut));
+ self.rsock = ReadSocket::Reading(Box::new(fut));
} else {
unreachable!()
}
Ok(crate::component_future::Poll::DidWork)
}
- ReadSocket::ReadingMessage(ref mut fut) => match fut.poll() {
+ ReadSocket::Reading(ref mut fut) => match fut.poll() {
Ok(futures::Async::Ready((msg, s))) => {
self.last_server_time = std::time::Instant::now();
self.rsock = ReadSocket::Connected(s);
@@ -489,14 +489,14 @@ impl<S: tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + 'static>
let msg = self.to_send.pop_front().unwrap();
msg.log("send");
let fut = msg.write_async(s);
- self.wsock = WriteSocket::WritingMessage(Box::new(fut));
+ self.wsock = WriteSocket::Writing(Box::new(fut));
} else {
unreachable!()
}
Ok(crate::component_future::Poll::DidWork)
}
- WriteSocket::WritingMessage(ref mut fut) => match fut.poll() {
+ WriteSocket::Writing(ref mut fut) => match fut.poll() {
Ok(futures::Async::Ready(s)) => {
self.wsock = WriteSocket::Connected(s);
Ok(crate::component_future::Poll::DidWork)