Turn chained if's into match
This commit is contained in:
parent
f2d7b705af
commit
90fa1b4909
|
@ -350,10 +350,11 @@ fn determine_preprocessors(config: &Config) -> Result<Vec<Box<Preprocessor>>> {
|
||||||
let mut preprocessors: Vec<Box<Preprocessor>> = Vec::new();
|
let mut preprocessors: Vec<Box<Preprocessor>> = Vec::new();
|
||||||
|
|
||||||
for key in preprocess_list {
|
for key in preprocess_list {
|
||||||
if key == "links" {
|
match key.as_ref() {
|
||||||
|
"links" => {
|
||||||
preprocessors.push(Box::new(LinkPreprocessor::new()))
|
preprocessors.push(Box::new(LinkPreprocessor::new()))
|
||||||
} else {
|
}
|
||||||
bail!("{:?} is not a recognised preprocessor", key);
|
_ => bail!("{:?} is not a recognised preprocessor", key),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue