Skip to content

Commit edb37a1

Browse files
committed
Fix unit tests by adding type annotation
1 parent df7ec7e commit edb37a1

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
@@ -325,13 +325,13 @@ impl<M: Message> Decodable for Action<M> {
325325

326326
#[cfg(test)]
327327
mod tests {
328-
use rlp::rlp_encode_and_decode_test;
329-
330328
use super::*;
329+
use consensus::solo::SoloMessage;
330+
use rlp::rlp_encode_and_decode_test;
331331

332332
#[test]
333333
fn decode_fail_if_change_params_have_no_signatures() {
334-
let action = Action::ChangeParams {
334+
let action = Action::<SoloMessage>::ChangeParams {
335335
metadata_seq: 3,
336336
params: CommonParams::default_for_test().into(),
337337
signatures: vec![],
@@ -341,13 +341,13 @@ mod tests {
341341
expected: 4,
342342
got: 3,
343343
}),
344-
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action>::<_>()
344+
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action<SoloMessage>>()
345345
);
346346
}
347347

348348
#[test]
349349
fn rlp_of_change_params() {
350-
rlp_encode_and_decode_test!(Action::ChangeParams {
350+
rlp_encode_and_decode_test!(Action::<SoloMessage>::ChangeParams {
351351
metadata_seq: 3,
352352
params: CommonParams::default_for_test().into(),
353353
signatures: vec![Signature::random(), Signature::random()],

0 commit comments

Comments
 (0)