Skip to content

Commit 424775b

Browse files
committed
controllers/version/yank: Replace r2d2 with deadpool
1 parent 3aa42e7 commit 424775b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/controllers/version/yank.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ async fn modify_yank(
5353
return Err(version_not_found(&crate_name, &version));
5454
}
5555

56-
spawn_blocking(move || {
57-
let conn = &mut *state.db_write()?;
58-
56+
let conn = state.db_write_async().await?;
57+
conn.interact(move |conn| {
5958
let auth = AuthCheck::default()
6059
.with_endpoint_scope(EndpointScope::Yank)
6160
.for_crate(&crate_name)
@@ -106,5 +105,5 @@ async fn modify_yank(
106105

107106
ok_true()
108107
})
109-
.await
108+
.await?
110109
}

0 commit comments

Comments
 (0)