Skip to content

Commit 721ce2a

Browse files
committed
models/krate: Remove redundant transaction
1 parent 8c1e803 commit 721ce2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/models/krate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'a> NewCrate<'a> {
105105
conn.transaction(|conn| {
106106
// To avoid race conditions, we try to insert
107107
// first so we know whether to add an owner
108-
if let Some(krate) = conn.transaction(|conn| self.create(conn, uploader).optional())? {
108+
if let Some(krate) = self.create(conn, uploader).optional()? {
109109
return Ok(krate);
110110
}
111111

0 commit comments

Comments
 (0)