remove unecessary returns

This commit is contained in:
Anatoly Yakovenko
2018-03-11 11:45:17 -05:00
parent 9d6e5bde4a
commit c82b520ea8

View File

@ -108,12 +108,12 @@ impl PacketData {
} }
i += 1; i += 1;
} }
return Ok(i); Ok(i)
} }
fn read_from(&mut self, socket: &UdpSocket) -> Result<()> { fn read_from(&mut self, socket: &UdpSocket) -> Result<()> {
let sz = self.run_read_from(socket)?; let sz = self.run_read_from(socket)?;
self.packets.resize(sz, Packet::default()); self.packets.resize(sz, Packet::default());
return Ok(()); Ok(())
} }
fn send_to(&self, socket: &UdpSocket, num: &mut usize) -> Result<()> { fn send_to(&self, socket: &UdpSocket, num: &mut usize) -> Result<()> {
for p in self.packets.iter() { for p in self.packets.iter() {
@ -122,7 +122,7 @@ impl PacketData {
//TODO(anatoly): wtf do we do about errors? //TODO(anatoly): wtf do we do about errors?
*num += 1; *num += 1;
} }
return Ok(()); Ok(())
} }
} }