mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Inline the withinTransaction() function.
This commit is contained in:
committed by
Nicholas Tinsley
parent
011a36c8f3
commit
2b1bbdda15
@@ -13,7 +13,7 @@ import androidx.sqlite.db.SupportSQLiteQueryBuilder
|
||||
*
|
||||
* @return The value returned by [block] if any
|
||||
*/
|
||||
fun <T : SupportSQLiteDatabase, R> T.withinTransaction(block: (T) -> R): R {
|
||||
inline fun <T : SupportSQLiteDatabase, R> T.withinTransaction(block: (T) -> R): R {
|
||||
beginTransaction()
|
||||
try {
|
||||
val toReturn = block(this)
|
||||
|
||||
Reference in New Issue
Block a user