Skip to content

Commit 429560d

Browse files
committed
clippy fix
Signed-off-by: Denis Varlakov <denis@dfns.co>
1 parent 1bd9600 commit 429560d

File tree

1 file changed

+3
-3
lines changed
  • round-based/src/simulation

1 file changed

+3
-3
lines changed

round-based/src/simulation/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ where
114114
///
115115
/// Panics if simulation contained zero parties.
116116
pub fn expect_same(mut self) -> T {
117-
let Some(first) = self.0.get(0) else {
117+
let Some(first) = self.0.first() else {
118118
panic!("simulation contained zero parties");
119119
};
120120

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

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

0 commit comments

Comments
 (0)