mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
[Crate] Apply clippy fixes
This commit is contained in:
parent
b95b2abe0f
commit
80637f2398
2 changed files with 4 additions and 3 deletions
|
|
@ -77,7 +77,7 @@ fn get_server_values(bufferer: &mut Bufferer) -> GDResult<HashMap<String, String
|
|||
fn get_players<Client: QuakeClient>(bufferer: &mut Bufferer) -> GDResult<Vec<Client::Player>> {
|
||||
let mut players: Vec<Client::Player> = Vec::new();
|
||||
|
||||
while !bufferer.is_remaining_empty() && bufferer.remaining_data() != &[0x00] {
|
||||
while !bufferer.is_remaining_empty() && bufferer.remaining_data() != [0x00] {
|
||||
let data = bufferer.get_string_utf8_newline()?;
|
||||
let data_split = data.split(' ').collect::<Vec<&str>>();
|
||||
let data_iter = data_split.iter();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ impl Socket for UdpSocket {
|
|||
|
||||
Ok(Self {
|
||||
socket,
|
||||
address: address.clone(),
|
||||
address: *address,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -81,8 +81,9 @@ impl Socket for UdpSocket {
|
|||
|
||||
fn send(&mut self, data: &[u8]) -> GDResult<()> {
|
||||
self.socket
|
||||
.send_to(data, &self.address)
|
||||
.send_to(data, self.address)
|
||||
.map_err(|_| PacketSend)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue