From cc74be5d2163fbb1e9d57f85d5546857c6602446 Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 30 Jul 2024 07:45:29 +0800 Subject: refactor: several improvements (#765) --- src/config/input.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/config/input.rs') diff --git a/src/config/input.rs b/src/config/input.rs index 6df3b71..fe1da51 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -9,13 +9,12 @@ use crate::utils::{base64_encode, sha256, AbortSignal}; use anyhow::{bail, Context, Result}; use fancy_regex::Regex; -use lazy_static::lazy_static; use std::{collections::HashMap, fs::File, io::Read, path::Path}; use unicode_width::{UnicodeWidthChar, UnicodeWidthStr}; const IMAGE_EXTS: [&str; 5] = ["png", "jpeg", "jpg", "webp", "gif"]; -lazy_static! { +lazy_static::lazy_static! { static ref URL_RE: Regex = Regex::new(r"^[A-Za-z0-9_-]{2,}:/").unwrap(); } -- cgit v1.2.3