Switched rules to Regexes, added Regex wrapper for serde
This commit is contained in:
@@ -9,6 +9,9 @@ use log::{error, info};
|
||||
pub mod utils;
|
||||
use utils::SettingsType;
|
||||
|
||||
pub mod regex_wrapper;
|
||||
use regex_wrapper::Regex;
|
||||
|
||||
/// Current version of the ruleset. It will help determine if the ruleset is
|
||||
/// outdated or from a more recent version of the software than the one being in
|
||||
/// use.
|
||||
@@ -121,7 +124,7 @@ pub struct Settings {
|
||||
/// a regex to be matched while the second represents the change
|
||||
/// to be made to the input data.
|
||||
#[serde(default)]
|
||||
rules: Vec<(String, String)>,
|
||||
pub rules: Vec<(Regex, Regex)>,
|
||||
}
|
||||
|
||||
/// Representation inside the crate of LangEvolve’s settings.
|
||||
|
||||
Reference in New Issue
Block a user