Skip to content

Commit

Permalink
chore: improve accessing the first element
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jan 29, 2024
1 parent fad04c5 commit 3305542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ fn opaque_start_client_registration(
fn get_optional_string(ident: Vec<String>) -> Result<Option<String>, Error> {
match ident.len() {
0 => Ok(None),
1 => ident.get(0).map_or_else(
1 => ident.first().map_or_else(
|| {
Err(Error::Input {
message: "error getting value at index 0".to_string(),
Expand Down

0 comments on commit 3305542

Please sign in to comment.