reduced code repetition in `fill_from_tomlconfig`
This commit is contained in:
parent
6d8ac6a23c
commit
d42ef1cdbc
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue