Skip to content

Commit

Permalink
refactor: use x.first() instead of x.get(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevFan committed Jan 5, 2024
1 parent 3a576e8 commit 0d5d926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion limitador-server/src/http_api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ mod tests {
.to_request();
let resp_limits: Vec<Limit> = test::call_and_read_body_json(&app, req).await;
assert_eq!(resp_limits.len(), 1);
assert_eq!(*resp_limits.get(0).unwrap(), Limit::from(&limit));
assert_eq!(*resp_limits.first().unwrap(), Limit::from(&limit));
}

#[actix_rt::test]
Expand Down

0 comments on commit 0d5d926

Please sign in to comment.