reduced code repetition in `fill_from_tomlconfig`

This commit is contained in:
Michal Budzynski 2017-06-23 17:01:11 +02:00
parent 6d8ac6a23c
commit d42ef1cdbc
1 changed files with 2 additions and 10 deletions

View File

@ -40,19 +40,11 @@ impl HtmlConfig {
let root = root.into();
if let Some(d) = tomlconfig.destination {
if d.is_relative() {
self.destination = root.join(d);
} else {
self.destination = d;
}
self.set_destination(&root, &d);
}
if let Some(t) = tomlconfig.theme {
if t.is_relative() {
self.theme = root.join(t);
} else {
self.theme = t;
}
self.set_theme(&root, &t);
}
if let Some(curly_quotes) = tomlconfig.curly_quotes {