From d42ef1cdbca081e670ec1c25e6a0195d95a16c4f Mon Sep 17 00:00:00 2001 From: Michal Budzynski Date: Fri, 23 Jun 2017 17:01:11 +0200 Subject: [PATCH] reduced code repetition in `fill_from_tomlconfig` --- src/config/htmlconfig.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/config/htmlconfig.rs b/src/config/htmlconfig.rs index 3b47ff4e..0cb2192b 100644 --- a/src/config/htmlconfig.rs +++ b/src/config/htmlconfig.rs @@ -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 {