Remove &Context from Peerstate and MimeParser

Passing Context around explicitly removes the need for explicit lifetimes.
This commit is contained in:
link2xt
2021-02-14 01:54:59 +03:00
committed by link2xt
parent 7404e8c85f
commit 57841cdcc0
7 changed files with 91 additions and 109 deletions

View File

@@ -1172,7 +1172,7 @@ async fn update_gossip_peerstates(
peerstate.apply_gossip(header, message_time);
peerstate.save_to_db(&context.sql, false).await?;
} else {
let p = Peerstate::from_gossip(context, header, message_time);
let p = Peerstate::from_gossip(header, message_time);
p.save_to_db(&context.sql, true).await?;
peerstate = Some(p);
}