From be9f824639840b30306a0926ea336d8b703b176c Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 2 Feb 2024 09:21:37 +0800 Subject: [PATCH] chore(url): Remove unnecessary parentheses Signed-off-by: Jianhui Zhao --- http/url.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/http/url.lua b/http/url.lua index fb0fde4..e0eda52 100644 --- a/http/url.lua +++ b/http/url.lua @@ -6,15 +6,15 @@ local M = {} local tonumber = tonumber function M.escape(s) - return (string.gsub(s, "([^A-Za-z0-9_])", function(c) + return string.gsub(s, "([^A-Za-z0-9_])", function(c) return string.format("%%%02x", string.byte(c)) - end)) + end) end function M.unescape(s) - return (string.gsub(s, "%%(%x%x)", function(hex) + return string.gsub(s, "%%(%x%x)", function(hex) return string.char(tonumber(hex, 16)) - end)) + end) end -- ://:@:/;?#