Skip to content

Commit 906d18e

Browse files
committed
Fix unit tests by adding type annotation
1 parent 71ea657 commit 906d18e

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

314314
#[cfg(test)]
315315
mod tests {
316-
use rlp::rlp_encode_and_decode_test;
317-
318316
use super::*;
317+
use consensus::solo::SoloMessage;
318+
use rlp::rlp_encode_and_decode_test;
319319

320320
#[test]
321321
fn decode_fail_if_change_params_have_no_signatures() {
322-
let action = Action::ChangeParams {
322+
let action = Action::<SoloMessage>::ChangeParams {
323323
metadata_seq: 3,
324324
params: CommonParams::default_for_test().into(),
325325
signatures: vec![],
@@ -329,13 +329,13 @@ mod tests {
329329
expected: 4,
330330
got: 3,
331331
}),
332-
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action>::<_>()
332+
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action<SoloMessage>>()
333333
);
334334
}
335335

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

0 commit comments

Comments
 (0)