Resolve E0308 ??

This commit is contained in:
Mylloon 2023-09-07 18:19:29 +02:00
parent e18b11a5fe
commit e1fc4b7a51
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -93,10 +93,10 @@ fn anglophonization(date: &str) -> String {
// Use 12:00 for chrono parser
"{} 12:00",
// Replace french by english month
re.replace_all(date, |cap: &Captures| {
match &cap[0] {
re.replace_all(date, |cap: &Captures| match &cap[0] {
month if dico.contains_key(month) => dico.get(month).unwrap(),
month => panic!("Unknown month: {}", month),
month => {
panic!("Unknown month: {}", month)
}
})
)