From 759728e3630036c7771a74794f19b52c2ff17597 Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 27 Dec 2021 00:03:52 +0100 Subject: [PATCH] Use match instead of find, minor performance gain --- src/formatters.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatters.nim b/src/formatters.nim index 4fd14fb..2d937a7 100644 --- a/src/formatters.nim +++ b/src/formatters.nim @@ -56,7 +56,7 @@ proc replaceUrl*(url: string; prefs: Prefs; absolute=""): string = proc getM3u8Url*(content: string): string = var m: RegexMatch - if content.find(m3u8Regex, m): + if content.match(m3u8Regex, m): result = content[m.group(0)[0]] proc proxifyVideo*(manifest: string; proxy: bool): string =