Commit a19af0fbbb

a19af0fbbbf116d6206b152105e758b8b5ba68c3

parent: 70c8a97d85

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-07-06 16:27 UTC

server: Rename the login state.

Layout: unified · split

src/server.rs +3 −3
@@ -119,7 +119,7 @@ impl ServerSettings {
119 } 119 }
120} 120}
121 121
122pub struct LoginState { 122pub struct LoginInfo {
123 user_id: UserId, 123 user_id: UserId,
124} 124}
125 125
@@ -162,7 +162,7 @@ pub(crate) struct InnerServer {
162 settings: ServerSettings, 162 settings: ServerSettings,
163 config: ConfigHandle, 163 config: ConfigHandle,
164 client: Option<Client>, 164 client: Option<Client>,
165 login_state: Option<LoginState>, 165 login_state: Option<LoginInfo>,
166 connected_state: Rc<RefCell<Option<Connection>>>, 166 connected_state: Rc<RefCell<Option<Connection>>>,
167 server_buffer: Rc<RefCell<Option<BufferHandle>>>, 167 server_buffer: Rc<RefCell<Option<BufferHandle>>>,
168} 168}
@@ -814,7 +814,7 @@ impl InnerServer {
814 } 814 }
815 815
816 pub fn receive_login(&mut self, response: LoginResponse) { 816 pub fn receive_login(&mut self, response: LoginResponse) {
817 let login_state = LoginState { 817 let login_state = LoginInfo {
818 user_id: response.user_id, 818 user_id: response.user_id,
819 }; 819 };
820 self.login_state = Some(login_state); 820 self.login_state = Some(login_state);