Skip to content

Commit 2ac4e10

Browse files
committed
Fix unit tests by adding type annotation
1 parent 40ac5ba commit 2ac4e10

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

290290
#[cfg(test)]
291291
mod tests {
292-
use rlp::rlp_encode_and_decode_test;
293-
294292
use super::*;
293+
use consensus::solo::SoloMessage;
294+
use rlp::rlp_encode_and_decode_test;
295295

296296
#[test]
297297
fn decode_fail_if_change_params_have_no_signatures() {
298-
let action = Action::ChangeParams {
298+
let action = Action::<SoloMessage>::ChangeParams {
299299
metadata_seq: 3,
300300
params: CommonParams::default_for_test().into(),
301301
signatures: vec![],
@@ -305,13 +305,13 @@ mod tests {
305305
expected: 4,
306306
got: 3,
307307
}),
308-
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action>::<_>()
308+
UntrustedRlp::new(&rlp::encode(&action)).as_val::<Action<SoloMessage>>()
309309
);
310310
}
311311

312312
#[test]
313313
fn rlp_of_change_params() {
314-
rlp_encode_and_decode_test!(Action::ChangeParams {
314+
rlp_encode_and_decode_test!(Action::<SoloMessage>::ChangeParams {
315315
metadata_seq: 3,
316316
params: CommonParams::default_for_test().into(),
317317
signatures: vec![Signature::random(), Signature::random()],

0 commit comments

Comments
 (0)