mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-01 19:43:19 +00:00
no unwrap
This commit is contained in:
parent
af6fa7accb
commit
2030136aa3
|
@ -117,7 +117,7 @@ where
|
||||||
T: Clone,
|
T: Clone,
|
||||||
{
|
{
|
||||||
static WEBFINGER_REGEX: Lazy<Regex> =
|
static WEBFINGER_REGEX: Lazy<Regex> =
|
||||||
Lazy::new(|| Regex::new(r"^acct:([\p{L}0-9_]+)@(.*)$").unwrap());
|
Lazy::new(|| Regex::new(r"^acct:([\p{L}0-9_]+)@(.*)$").expect("compile regex"));
|
||||||
// Regex to extract usernames from webfinger query. Supports different alphabets using `\p{L}`.
|
// Regex to extract usernames from webfinger query. Supports different alphabets using `\p{L}`.
|
||||||
// TODO: This should use a URL parser
|
// TODO: This should use a URL parser
|
||||||
let captures = WEBFINGER_REGEX
|
let captures = WEBFINGER_REGEX
|
||||||
|
|
Loading…
Reference in a new issue