Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Varlakov <denis@dfns.co>
  • Loading branch information
survived committed Nov 26, 2024
1 parent 1bd9600 commit 429560d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions round-based/src/simulation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ where
///
/// Panics if simulation contained zero parties.
pub fn expect_same(mut self) -> T {
let Some(first) = self.0.get(0) else {
let Some(first) = self.0.first() else {
panic!("simulation contained zero parties");
};

if !self.0[1..].iter().all(|i| i == first) {
let mut msg = alloc::format!(
let mut msg = alloc::string::String::from(
"Simulation output didn't match expectations.\n\
Expected: all parties return the same output\n\
Actual : some of the parties returned a different output\n\
Outputs :\n"
Outputs :\n",
);

for (i, res) in self.0.iter().enumerate() {
Expand Down

0 comments on commit 429560d

Please sign in to comment.