From 33e3327a70b55075e6a7e5383e8d44ce5bfa2436 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 1 Jul 2024 23:42:50 +0000 Subject: [PATCH] Updated the guard description based on maintainer comments --- docs/rorm/transactions.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/rorm/transactions.md b/docs/rorm/transactions.md index a15159b..acf2e5a 100644 --- a/docs/rorm/transactions.md +++ b/docs/rorm/transactions.md @@ -97,9 +97,8 @@ pub async fn create_user( ## Using a Guard -When a single transaction may be used across function calls, -or when either a transaction or the database itself may be passed to -these functions, a `TransactionGuard` can be used. It can be +When either a transaction or the database itself may be passed +to a function, a `TransactionGuard` can be used. It can be retrieved by an `Executor`, which is implemented by both the `Transaction` and `Database`. The guard is responsible for committing the transaction if necessary; since mid-transaction