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

@ -1,8 +1,8 @@
use std::{borrow::Cow, rc::Rc};
use fancy_regex::Regex;
use futures::{stream, StreamExt};
use once_cell::sync::Lazy;
use regex::Regex;
use serde::Serialize;
use crate::{
@ -268,8 +268,6 @@ fn map_artist_page(
let wikipedia_url = header.description.as_deref().and_then(|h| {
WIKIPEDIA_REGEX
.captures(h)
.ok()
.flatten()
.and_then(|c| c.get(0))
.map(|m| m.as_str().to_owned())
});