diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-03 09:36:48 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-03 09:36:50 +0100 |
commit | c09c16aa3d1aa7e84b11ff9e8f18c2ce71550dc4 (patch) | |
tree | 3251305d58b6978fb2267eeb8b0284d985c172ce /src/config/not_validated.rs | |
parent | 28725470845a23e89fbbd84714da29cae85123e9 (diff) |
Remove variable interpolation in config file
This was unused anyways, and I am not even sure what we implemented it
for.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config/not_validated.rs')
-rw-r--r-- | src/config/not_validated.rs | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/config/not_validated.rs b/src/config/not_validated.rs index c91a0cb..a18b19c 100644 --- a/src/config/not_validated.rs +++ b/src/config/not_validated.rs @@ -28,10 +28,12 @@ pub struct NotValidatedConfiguration { script_highlight_theme: Option<String>, #[serde(rename = "releases")] - releases_directory: String, + #[getset(get = "pub")] + releases_directory: PathBuf, #[serde(rename = "staging")] - staging_directory: String, + #[getset(get = "pub")] + staging_directory: PathBuf, #[serde(rename = "source_cache")] #[getset(get = "pub")] @@ -67,8 +69,8 @@ pub struct NotValidatedConfiguration { available_phases: Vec<PhaseName>, } -impl<'reg> NotValidatedConfiguration { - pub fn validate(self) -> Result<Configuration<'reg>> { +impl NotValidatedConfiguration { + pub fn validate(self) -> Result<Configuration> { // TODO: Implement proper validation if let Some(configured_theme) = self.script_highlight_theme.as_ref() { let allowed_theme_present = [ @@ -86,17 +88,7 @@ impl<'reg> NotValidatedConfiguration { } } - let hb = { - let mut hb = Handlebars::new(); - hb.register_template_string("releases", &self.releases_directory)?; - hb.register_template_string("staging", &self.staging_directory)?; - hb - }; - - Ok(Configuration { - inner: self, - hb, - }) + Ok(Configuration { inner: self }) } } |