diff --git a/src/protocols/valve/protocol.rs b/src/protocols/valve/protocol.rs index 031cf84..c03148f 100644 --- a/src/protocols/valve/protocol.rs +++ b/src/protocols/valve/protocol.rs @@ -383,8 +383,8 @@ impl ValveProtocol { Ok(players) } - /// Get the server rules's. - fn get_server_rules(&mut self, app: &App, protocol: u8) -> GDResult>> { + /// Get the server's rules. + fn get_server_rules(&mut self, app: &App, protocol: u8) -> GDResult> { let mut buffer = self.get_request_data(&app, protocol, Request::RULES)?; let count = buffer.get_u16()? as usize; @@ -397,7 +397,7 @@ impl ValveProtocol { }) } - Ok(Some(rules)) + Ok(rules) } } @@ -430,7 +430,7 @@ fn get_response(address: &str, port: u16, app: App, gather_settings: GatheringSe }, rules: match gather_settings.rules { false => None, - true => client.get_server_rules(&app, protocol)? + true => Some(client.get_server_rules(&app, protocol)?) } }) }