mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Update Rust nightly
Supersedes #368. Adds exceptions for unwrap_or_default due to preference against Default's ambiguity.
This commit is contained in:
@@ -19,7 +19,10 @@ impl<N: Network> MessageLog<N> {
|
||||
// Returns true if it's a new message
|
||||
pub(crate) fn log(&mut self, signed: SignedMessageFor<N>) -> Result<bool, TendermintError<N>> {
|
||||
let msg = &signed.msg;
|
||||
// Clarity, and safety around default != new edge cases
|
||||
#[allow(clippy::unwrap_or_default)]
|
||||
let round = self.log.entry(msg.round).or_insert_with(HashMap::new);
|
||||
#[allow(clippy::unwrap_or_default)]
|
||||
let msgs = round.entry(msg.sender).or_insert_with(HashMap::new);
|
||||
|
||||
// Handle message replays without issue. It's only multiple messages which is malicious
|
||||
|
||||
Reference in New Issue
Block a user