From d1cb945f0e7e8b45e50d5214076a7b9d90f184cf Mon Sep 17 00:00:00 2001 From: thindil Date: Fri, 6 Oct 2023 04:23:06 +0000 Subject: [PATCH] style: use object's call instead of function's call FossilOrigin-Name: e81ef5643acc63f53d26fc2ed0c8f1bacf4d5b0de8f7212d0f169600131c7cb9 --- src/options.nim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/options.nim b/src/options.nim index e37d8e3c..3ed46994 100644 --- a/src/options.nim +++ b/src/options.nim @@ -359,8 +359,7 @@ proc resetOptions*(arguments; db): ResultCode {.gcsafe, sideEffect, raises: [], # Reset all options if optionName == "all": try: - sqlite.exec(db = db, query = sql( - query = "UPDATE options SET value=defaultvalue WHERE readonly=0")) + db.exec(query = sql(query = "UPDATE options SET value=defaultvalue WHERE readonly=0")) showOutput(message = "All shell's options are reseted to their default values.") except DbError: return showError(message = "Can't reset the shell's options to their default values. Reason: ", @@ -396,8 +395,7 @@ proc updateOptionsDb*(db): ResultCode {.gcsafe, sideEffect, raises: [], tags: [ db != nil body: try: - sqlite.exec(db = db, query = sql( - query = """ALTER TABLE options ADD readonly BOOLEAN DEFAULT 0""")) + db.exec(query = sql(query = """ALTER TABLE options ADD readonly BOOLEAN DEFAULT 0""")) except DbError: return showError(message = "Can't update table for the shell's options. Reason: ", e = getCurrentException())