diff options
| author | sigoden <sigoden@gmail.com> | 2024-07-30 07:45:29 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-30 07:45:29 +0800 |
| commit | cc74be5d2163fbb1e9d57f85d5546857c6602446 (patch) | |
| tree | 9897a88950ad6fc65dbd63f0cb9bbc9e7290d950 /src/config/input.rs | |
| parent | 4c18e91165269970747bd2734b9b5db013ade2c2 (diff) | |
| download | aichat-cc74be5d2163fbb1e9d57f85d5546857c6602446.tar.gz | |
refactor: several improvements (#765)
Diffstat (limited to 'src/config/input.rs')
| -rw-r--r-- | src/config/input.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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(); } |
