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() {
|
||||||
preprocessors.push(Box::new(LinkPreprocessor::new()))
|
"links" => {
|
||||||
} else {
|
preprocessors.push(Box::new(LinkPreprocessor::new()))
|
||||||
bail!("{:?} is not a recognised preprocessor", key);
|
}
|
||||||
|
_ => bail!("{:?} is not a recognised preprocessor", key),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue