Purging .derefs, fixing clippy warnings. (#1890)
* Fixing clippy warnings * Purging derefs * Simplifying engine derefs * Simplifying more engine derefs
This commit is contained in:
committed by
Arkadiy Paronyan
parent
8018b69440
commit
a427208f79
@@ -787,7 +787,7 @@ impl Host {
|
||||
let entry = NodeEntry { id: s.id().unwrap().clone(), endpoint: NodeEndpoint { address: address, udp_port: address.port() } };
|
||||
self.nodes.write().add_node(Node::new(entry.id.clone(), entry.endpoint.clone()));
|
||||
let mut discovery = self.discovery.lock();
|
||||
if let Some(ref mut discovery) = *discovery.deref_mut() {
|
||||
if let Some(ref mut discovery) = *discovery {
|
||||
discovery.add_node(entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ impl TestProtocol {
|
||||
}
|
||||
|
||||
pub fn got_packet(&self) -> bool {
|
||||
self.packet.lock().deref()[..] == b"hello"[..]
|
||||
self.packet.lock()[..] == b"hello"[..]
|
||||
}
|
||||
|
||||
pub fn got_timeout(&self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user