Skip to content

Commit 73fae8f

Browse files
committed
Fix unit tests by adding type annotation
1 parent abf31cf commit 73fae8f

File tree

2 files changed

+55
-52
lines changed

2 files changed

+55
-52
lines changed

core/src/consensus/stake/actions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,13 @@ impl<M: Message> Decodable for Action<M> {
315315

316316
#[cfg(test)]
317317
mod tests {
318-
use rlp::rlp_encode_and_decode_test;
319-
320318
use super::*;
319+
use consensus::solo::SoloMessage;
320+
use rlp::rlp_encode_and_decode_test;
321321

322322
#[test]
323323
fn decode_fail_if_change_params_have_no_signatures() {
324-
let action = Action::ChangeParams {
324+
let action = Action::<SoloMessage>::ChangeParams {
325325
metadata_seq: 3,
326326
params: CommonParams::default_for_test().into(),
327327
signatures: vec![],
@@ -331,13 +331,13 @@ mod tests {
331331
expected: 4,
332332
got: 3,
333333
}),
334-
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action>::<_>()
334+
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action<SoloMessage>>()
335335
);
336336
}
337337

338338
#[test]
339339
fn rlp_of_change_params() {
340-
rlp_encode_and_decode_test!(Action::ChangeParams {
340+
rlp_encode_and_decode_test!(Action::<SoloMessage>::ChangeParams {
341341
metadata_seq: 3,
342342
params: CommonParams::default_for_test().into(),
343343
signatures: vec![Signature::random(), Signature::random()],

0 commit comments

Comments
 (0)