Allowed used of deprecated function inside a deprecated function

This commit is contained in:
Jedrzej Stuczynski
2020-03-05 15:07:33 +00:00
parent 9eae7a23ce
commit 8b90953ae0
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -48,6 +48,7 @@ pub fn loop_cover_message<T: NymTopology>(
) -> Result<(SocketAddr, SphinxPacket), SphinxPacketEncapsulationError> {
let destination = Destination::new(our_address, surb_id);
#[allow(deprecated)]
encapsulate_message(
destination,
LOOP_COVER_MESSAGE_PAYLOAD.to_vec(),
+1 -2
View File
@@ -41,9 +41,8 @@ impl<T: NymTopology> TopologyAccessor<T> {
self.inner.lock().await.update(new_topology);
}
// Unless you absolutely need the entire topology, use `random_route` instead
pub(crate) async fn get_current_topology_clone(&mut self) -> Option<T> {
// TODO: considering topology is gotten quite frequently, the clone call might be rather
// expensive in the grand scheme of things...
self.inner.lock().await.0.clone()
}