Skip to content

Commit

Permalink
minor: more direct conversions in NetworkWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-markin committed Nov 13, 2024
1 parent c3b039f commit 391047d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions substrate/client/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1455,17 +1455,17 @@ where
fn handle_worker_message(&mut self, msg: ServiceToWorkerMsg) {
match msg {
ServiceToWorkerMsg::GetValue(key) =>
self.network_service.behaviour_mut().get_value(key.to_vec().into()),
self.network_service.behaviour_mut().get_value(key.into()),
ServiceToWorkerMsg::PutValue(key, value) =>
self.network_service.behaviour_mut().put_value(key.to_vec().into(), value),
self.network_service.behaviour_mut().put_value(key.into(), value),
ServiceToWorkerMsg::PutRecordTo { record, peers, update_local_storage } => self
.network_service
.behaviour_mut()
.put_record_to(record.into(), peers, update_local_storage),
ServiceToWorkerMsg::StoreRecord(key, value, publisher, expires) => self
.network_service
.behaviour_mut()
.store_record(key.to_vec().into(), value, publisher, expires),
.store_record(key.into(), value, publisher, expires),
ServiceToWorkerMsg::AddKnownAddress(peer_id, addr) =>
self.network_service.behaviour_mut().add_known_address(peer_id, addr),
ServiceToWorkerMsg::EventStream(sender) => self.event_streams.push(sender),
Expand Down

0 comments on commit 391047d

Please sign in to comment.