This commit is contained in:
2023-09-14 21:47:17 +02:00
parent efa6c4b89a
commit aca73a3d80
27 changed files with 62 additions and 90 deletions

View File

@@ -16,7 +16,7 @@ impl FromStr for BookCallbackData {
type Err = strum::ParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let re = Regex::new(r"^b(?P<an_type>a|t|s)_(?P<id>\d+)_(?P<page>\d+)$").unwrap();
let re = Regex::new(r"^b(?P<an_type>[ats])_(?P<id>\d+)_(?P<page>\d+)$").unwrap();
let caps = re.captures(s);
let caps = match caps {