Skip to content

Commit 8d3a7b7

Browse files
committed
RUST-1663: Move clones out of async block since they do not need to be in the async block
1 parent c6e98e0 commit 8d3a7b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/spec/oidc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ async fn machine_single_principal_implicit_username() -> anyhow::Result<()> {
2929
.mechanism(AuthMechanism::MongoDbOidc)
3030
.oidc_callback(oidc::Callback::machine(move |_| {
3131
let call_count = cb_call_count.clone();
32+
*call_count.lock().unwrap() += 1;
3233
async move {
33-
*call_count.lock().unwrap() += 1;
3434
Ok(oidc::IdpServerResponse {
3535
access_token: tokio::fs::read_to_string("/tmp/tokens/test_user1").await?,
3636
expires: None,
@@ -80,8 +80,8 @@ async fn human_single_principal_implicit_username() -> anyhow::Result<()> {
8080
.mechanism(AuthMechanism::MongoDbOidc)
8181
.oidc_callback(oidc::Callback::human(move |_| {
8282
let call_count = cb_call_count.clone();
83+
*call_count.lock().unwrap() += 1;
8384
async move {
84-
*call_count.lock().unwrap() += 1;
8585
Ok(oidc::IdpServerResponse {
8686
access_token: tokio::fs::read_to_string("/tmp/tokens/test_user1").await?,
8787
expires: None,

0 commit comments

Comments
 (0)