Skip to content

Commit

Permalink
style: use object's call instead of function's call
Browse files Browse the repository at this point in the history
FossilOrigin-Name: e81ef5643acc63f53d26fc2ed0c8f1bacf4d5b0de8f7212d0f169600131c7cb9
  • Loading branch information
thindil committed Oct 6, 2023
1 parent 39d7ac0 commit d1cb945
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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: ",
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit d1cb945

Please sign in to comment.