mirror of
https://github.com/serai-dex/serai.git
synced 2025-04-22 22:18:15 +00:00
Use try_from instead of as
This commit is contained in:
parent
4c46e573fc
commit
4004f41257
1 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ fn test_valid_participants_inner<K: KeyGenParams>() {
|
|||
&mut tx,
|
||||
CoordinatorMessage::Participation {
|
||||
session: SESSION,
|
||||
participant: Participant::new(i as u16 + 1).unwrap(),
|
||||
participant: Participant::new(u16::try_from(i).unwrap() + 1).unwrap(),
|
||||
participation,
|
||||
},
|
||||
);
|
||||
|
@ -220,7 +220,7 @@ fn test_some_bad_participants_inner<K: KeyGenParams>() {
|
|||
&mut tx,
|
||||
CoordinatorMessage::Participation {
|
||||
session: SESSION,
|
||||
participant: Participant::new(i as u16 + 1).unwrap(),
|
||||
participant: Participant::new(u16::try_from(i).unwrap() + 1).unwrap(),
|
||||
participation,
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue