mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-13 14:39:25 +00:00
Use try_from instead of as
This commit is contained in:
@@ -105,7 +105,7 @@ fn test_valid_participants_inner<K: KeyGenParams>() {
|
|||||||
&mut tx,
|
&mut tx,
|
||||||
CoordinatorMessage::Participation {
|
CoordinatorMessage::Participation {
|
||||||
session: SESSION,
|
session: SESSION,
|
||||||
participant: Participant::new(i as u16 + 1).unwrap(),
|
participant: Participant::new(u16::try_from(i).unwrap() + 1).unwrap(),
|
||||||
participation,
|
participation,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -220,7 +220,7 @@ fn test_some_bad_participants_inner<K: KeyGenParams>() {
|
|||||||
&mut tx,
|
&mut tx,
|
||||||
CoordinatorMessage::Participation {
|
CoordinatorMessage::Participation {
|
||||||
session: SESSION,
|
session: SESSION,
|
||||||
participant: Participant::new(i as u16 + 1).unwrap(),
|
participant: Participant::new(u16::try_from(i).unwrap() + 1).unwrap(),
|
||||||
participation,
|
participation,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user