Fix KeywordSection::load not deserializing correctly

This commit is contained in:
0xf8 2023-04-20 18:10:37 -04:00
parent 91b587f7db
commit 435b05949e
Signed by: 0xf8
GPG Key ID: 446580D758689584

View File

@ -5,7 +5,8 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct KeywordSection {
pub threshold: u64,
pub requiredKeywords: Vec<String>,
#[serde(rename = "requiredKeywords")]
pub required: Vec<String>,
pub keywords: Vec<String>,
}
@ -27,7 +28,7 @@ impl KeywordSection {
}
}
for rkw in self.requiredKeywords.to_owned() {
for rkw in self.required.to_owned() {
if s.contains(&rkw) {
hits += 1;
hit_required = true;