diff options
author | Hristo Venev <hristo@venev.name> | 2020-02-04 22:58:37 +0100 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2020-02-04 22:58:37 +0100 |
commit | 80589fb9c08e3c15b31db51c7a40767ff6fbf33d (patch) | |
tree | e75fc9e28a706e89c92fa04af8cbf51b8a574454 /src/manager/mod.rs | |
parent | e6c406879696a53d40f175d11d14a55d9480a57e (diff) |
Move source names inside the source sections.
This means that the order of the sources is preserved.
Diffstat (limited to 'src/manager/mod.rs')
-rw-r--r-- | src/manager/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/manager/mod.rs b/src/manager/mod.rs index b7fb8c2..d4799a7 100644 --- a/src/manager/mod.rs +++ b/src/manager/mod.rs @@ -9,7 +9,6 @@ use std::path::PathBuf; use std::time::{Duration, Instant, SystemTime}; struct Source { - name: String, config: config::Source, data: proto::Source, next_update: Instant, @@ -50,8 +49,8 @@ impl Manager { let _ = m.current_load(); - for (name, cfg) in c.sources { - m.add_source(name, cfg)?; + for cfg in c.sources { + m.add_source(cfg)?; } Ok(m) @@ -92,9 +91,8 @@ impl Manager { } } - fn add_source(&mut self, name: String, config: config::Source) -> io::Result<()> { + fn add_source(&mut self, config: config::Source) -> io::Result<()> { let mut s = Source { - name, config, data: proto::Source::empty(), next_update: Instant::now(), |