Mercurial > templog
diff rust/src/params.rs @ 635:4424a8b30f9c rust
config crate wants everything to be lower case
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 22 Sep 2019 22:06:46 +0800 |
parents | a5721c02d3ee |
children | 43eb3cfdf769 |
line wrap: on
line diff
--- a/rust/src/params.rs Sun Sep 22 20:35:40 2019 +0800 +++ b/rust/src/params.rs Sun Sep 22 22:06:46 2019 +0800 @@ -60,7 +60,7 @@ } pub fn load(config: &Config) -> Params { - Self::try_load(&config.PARAMS_FILE) + Self::try_load(&config.params_file) .unwrap_or_else(|_| Params::defaults()) } @@ -148,14 +148,14 @@ } fn write_params(&self, params: &Params) { - let p = atomicwrites::AtomicFile::new(&self.config.PARAMS_FILE, atomicwrites::AllowOverwrite); + let p = atomicwrites::AtomicFile::new(&self.config.params_file, atomicwrites::AllowOverwrite); p.write(|f| { serde_json::to_writer(f, params) }); } fn do_poll(&mut self, ctx: &Context<<Self as Actor>::Msg>) -> Result<(), TemplogError> { - let url = self.config.SETTINGS_URL.clone(); + let url = self.config.settings_url.clone(); let etag = self.last_etag.borrow().clone(); let h = ctx.run(async move { Self::wait_updates(&url, &etag).await