Skip to content

Commit dfa05a9

Browse files
committed
Fix unit tests by adding type annotation
1 parent a8fc0fd commit dfa05a9

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
@@ -325,10 +325,12 @@ mod tests {
325325
use rlp::rlp_encode_and_decode_test;
326326

327327
use super::*;
328+
use consensus::solo::SoloMessage;
329+
use rlp::rlp_encode_and_decode_test;
328330

329331
#[test]
330332
fn decode_fail_if_change_params_have_no_signatures() {
331-
let action = Action::ChangeParams {
333+
let action = Action::<SoloMessage>::ChangeParams {
332334
metadata_seq: 3,
333335
params: CommonParams::default_for_test().into(),
334336
signatures: vec![],
@@ -338,13 +340,13 @@ mod tests {
338340
expected: 4,
339341
got: 3,
340342
}),
341-
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action>::<_>()
343+
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action<SoloMessage>>()
342344
);
343345
}
344346

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

0 commit comments

Comments
 (0)