mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Replace (check and) del pattern with pop method
This commit is contained in:
@ -96,8 +96,7 @@ class MessageCache:
|
||||
last_entries: List[CacheEntry] = self.history[len(self.history) - 1]
|
||||
|
||||
for entry in last_entries:
|
||||
if entry.mid in self.msgs:
|
||||
del self.msgs[entry.mid]
|
||||
self.msgs.pop(entry.mid)
|
||||
|
||||
i: int = len(self.history) - 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user