use regex::Regex in pixiv link parse

This commit is contained in:
2022-06-21 15:23:42 +00:00
committed by GitHub
parent dc12324c9b
commit 2d617f1464
3 changed files with 3 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
use crate::ext::json::ToJson;
use fancy_regex::Regex;
use regex::Regex;
use json::JsonValue;
use reqwest::IntoUrl;
use std::convert::TryInto;
@@ -28,10 +28,6 @@ impl PixivID {
return Some(PixivID::Artwork(num.unwrap()));
}
let re = RE.captures(s);
if re.is_err() {
return None;
}
let re = re.unwrap();
if re.is_some() {
let r = re.unwrap().name("id");
if r.is_some() {