refactor: use fancy-regex only for backtracking
This commit is contained in:
parent
4cc069fba2
commit
92a358a079
12 changed files with 69 additions and 108 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue