refactor: use fancy-regex only for backtracking

This commit is contained in:
ThetaDev 2023-01-23 15:33:05 +01:00
parent 4cc069fba2
commit 92a358a079
12 changed files with 69 additions and 108 deletions

View file

@ -97,7 +97,7 @@ impl From<ChannelRss> for crate::model::ChannelRss {
.uri
.strip_prefix("https://www.youtube.com/channel/")
.and_then(|id| {
if util::CHANNEL_ID_REGEX.is_match(id).unwrap_or_default() {
if util::CHANNEL_ID_REGEX.is_match(id) {
Some(id.to_owned())
} else {
None