refactor: remove do_query function

This commit is contained in:
JuanZoran
2023-03-15 20:57:28 +08:00
parent 21351b3a26
commit af4bb42d59
8 changed files with 66 additions and 87 deletions

View File

@@ -3,7 +3,6 @@ local Trans = require('Trans')
---@class TransBackend
---@field query fun(data: TransData)---@async
---@field opts TransBackendOpts
---@field no_wait? boolean whether need to wait for the result
---@field name string @backend name
@@ -21,9 +20,6 @@ if file then
end
local default_opts = conf.backend.default
default_opts.__index = default_opts
---@class Trans
---@field backend table<string, TransBackend>
return setmetatable({}, {
@@ -36,8 +32,6 @@ return setmetatable({}, {
backend = self[name]
end
backend.opts = setmetatable(conf.backend[name] or {}, default_opts)
local private_opts = result[name]
if private_opts then
for k, v in pairs(private_opts) do