mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
chore: apply clippy suggestions (#208)
* perf: apply clippy suggestions * allow some unused imports, remove unused import
This commit is contained in:
parent
27840e3ff3
commit
79aeec8df6
5 changed files with 6 additions and 7 deletions
|
|
@ -31,12 +31,12 @@ pub fn query(address: &IpAddr, port: Option<u16>) -> GDResult<game::Response> {
|
|||
}
|
||||
|
||||
if let Some(bat_name) = rules.get("bat_name_s") {
|
||||
valve_response.info.name = bat_name.clone();
|
||||
valve_response.info.name.clone_from(bat_name);
|
||||
rules.remove("bat_name_s");
|
||||
}
|
||||
|
||||
if let Some(bat_gamemode) = rules.get("bat_gamemode_s") {
|
||||
valve_response.info.game_mode = bat_gamemode.clone();
|
||||
valve_response.info.game_mode.clone_from(bat_gamemode);
|
||||
rules.remove("bat_gamemode_s");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@ use crate::protocols::types::{GatherToggle, ProprietaryProtocol};
|
|||
use crate::protocols::valve::GatheringSettings;
|
||||
use phf::{phf_map, Map};
|
||||
|
||||
#[cfg(feature = "tls")]
|
||||
use crate::protocols::epic::Credentials;
|
||||
|
||||
macro_rules! game {
|
||||
($name: literal, $default_port: expr, $protocol: expr) => {
|
||||
game!(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ pub mod protocol;
|
|||
/// All types used by the implementation.
|
||||
pub mod types;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
pub use protocol::*;
|
||||
pub use types::*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue