moved all RE_USERNAME occurrences to regex.rs

switch to normal Cargo.toml

switch to normal Cargo.toml

switch to normal Cargo.toml

solved bug
This commit is contained in:
meguminloli
2021-09-15 20:48:23 +03:00
parent 2660b96250
commit a2bfaa5791
8 changed files with 98 additions and 82 deletions

4
src/util/regex.rs Normal file
View File

@@ -0,0 +1,4 @@
use once_cell::sync::Lazy;
use regex::Regex;
pub static RE_USERNAME: Lazy<Regex> = Lazy::new(|| Regex::new(r"^[a-zA-Z0-9_.]+$").unwrap());