From 80589fb9c08e3c15b31db51c7a40767ff6fbf33d Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Tue, 4 Feb 2020 22:58:37 +0100 Subject: Move source names inside the source sections. This means that the order of the sources is preserved. --- src/manager/updater.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/manager/updater.rs') diff --git a/src/manager/updater.rs b/src/manager/updater.rs index 0245e95..db24d6e 100644 --- a/src/manager/updater.rs +++ b/src/manager/updater.rs @@ -20,7 +20,7 @@ impl Updater { fn cache_path(&self, s: &Source) -> Option { let mut p = self.config.cache_directory.as_ref()?.clone(); - p.push(&s.name); + p.push(&s.config.name); Some(p) } @@ -34,7 +34,7 @@ impl Updater { match fileutil::update(&path, &data) { Ok(()) => {} Err(e) => { - eprintln!("<4>Failed to cache [{}]: {}", &src.name, e); + eprintln!("<4>Failed to cache [{}]: {}", &src.config.name, e); } } } @@ -51,7 +51,7 @@ impl Updater { return false; } Err(e) => { - eprintln!("<3>Failed to read [{}] from cache: {}", &src.name, e); + eprintln!("<3>Failed to read [{}] from cache: {}", &src.config.name, e); return false; } }; @@ -60,7 +60,7 @@ impl Updater { src.data = match serde::Deserialize::deserialize(&mut de) { Ok(r) => r, Err(e) => { - eprintln!("<3>Failed to load [{}] from cache: {}", &src.name, e); + eprintln!("<3>Failed to load [{}] from cache: {}", &src.config.name, e); return false; } }; -- cgit