Skip to content

Commit

Permalink
Use try_from instead of as
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Jan 30, 2025
1 parent 4c46e57 commit 4004f41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processor/key-gen/tests/key_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
);
Expand Down Expand Up @@ -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,
},
);
Expand Down

0 comments on commit 4004f41

Please sign in to comment.