Skip to content

Commit 0f05e8c

Browse files
committed
Fix unit tests by adding type annotation
1 parent a16a475 commit 0f05e8c

File tree

2 files changed

+55
-50
lines changed

2 files changed

+55
-50
lines changed

core/src/consensus/stake/actions.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,12 @@ mod tests {
327327
use rlp::rlp_encode_and_decode_test;
328328

329329
use super::*;
330+
use consensus::solo::SoloMessage;
331+
use rlp::rlp_encode_and_decode_test;
330332

331333
#[test]
332334
fn decode_fail_if_change_params_have_no_signatures() {
333-
let action = Action::ChangeParams {
335+
let action = Action::<SoloMessage>::ChangeParams {
334336
metadata_seq: 3,
335337
params: CommonParams::default_for_test().into(),
336338
signatures: vec![],
@@ -340,13 +342,13 @@ mod tests {
340342
expected: 4,
341343
got: 3,
342344
}),
343-
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action>::<_>()
345+
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action<SoloMessage>>()
344346
);
345347
}
346348

347349
#[test]
348350
fn rlp_of_change_params() {
349-
rlp_encode_and_decode_test!(Action::ChangeParams {
351+
rlp_encode_and_decode_test!(Action::<SoloMessage>::ChangeParams {
350352
metadata_seq: 3,
351353
params: CommonParams::default_for_test().into(),
352354
signatures: vec![Signature::random(), Signature::random()],

0 commit comments

Comments
 (0)