Minor changes
Minor changes
This commit is contained in:
parent
c78bb31b69
commit
87e326e869
20
src/main.rs
20
src/main.rs
@ -242,32 +242,32 @@ fn main() {
|
|||||||
let mut tasks = vec![];
|
let mut tasks = vec![];
|
||||||
|
|
||||||
for i in 1..rules_count + 1 {
|
for i in 1..rules_count + 1 {
|
||||||
let service = if cfg[&format!("{}{}", "rule", i)].contains_key("service") {
|
let service = if cfg[&format!("rule{}", i)].contains_key("service") {
|
||||||
cfg[&format!("{}{}", "rule", i)]["service"].clone().unwrap()
|
cfg[&format!("rule{}", i)]["service"].clone().unwrap()
|
||||||
} else {
|
} else {
|
||||||
format!("Service {}", i)
|
format!("Service {}", i)
|
||||||
};
|
};
|
||||||
|
|
||||||
let uri = if cfg[&format!("{}{}", "rule", i)].contains_key("uri") {
|
let uri = if cfg[&format!("rule{}", i)].contains_key("uri") {
|
||||||
cfg[&format!("{}{}", "rule", i)]["uri"].clone().unwrap()
|
cfg[&format!("rule{}", i)]["uri"].clone().unwrap()
|
||||||
} else {
|
} else {
|
||||||
"".to_string()
|
"".to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
let process = if cfg[&format!("{}{}", "rule", i)].contains_key("process") {
|
let process = if cfg[&format!("rule{}", i)].contains_key("process") {
|
||||||
cfg[&format!("{}{}", "rule", i)]["process"].clone().unwrap()
|
cfg[&format!("rule{}", i)]["process"].clone().unwrap()
|
||||||
} else {
|
} else {
|
||||||
"".to_string()
|
"".to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
let email = if cfg[&format!("{}{}", "rule", i)].contains_key("email") {
|
let email = if cfg[&format!("rule{}", i)].contains_key("email") {
|
||||||
cfg[&format!("{}{}", "rule", i)]["email"].clone().unwrap()
|
cfg[&format!("rule{}", i)]["email"].clone().unwrap()
|
||||||
} else {
|
} else {
|
||||||
"".to_string()
|
"".to_string()
|
||||||
};
|
};
|
||||||
|
|
||||||
let command = if cfg[&format!("{}{}", "rule", i)].contains_key("command") {
|
let command = if cfg[&format!("rule{}", i)].contains_key("command") {
|
||||||
cfg[&format!("{}{}", "rule", i)]["command"].clone().unwrap()
|
cfg[&format!("rule{}", i)]["command"].clone().unwrap()
|
||||||
} else {
|
} else {
|
||||||
"".to_string()
|
"".to_string()
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user