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/builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/manager/builder.rs') diff --git a/src/manager/builder.rs b/src/manager/builder.rs index 9c2ad15..e302f7e 100644 --- a/src/manager/builder.rs +++ b/src/manager/builder.rs @@ -18,7 +18,7 @@ pub struct Error { impl Error { fn new(err: &'static str, src: &Source, p: &proto::Peer, important: bool) -> Self { Self { - src: src.name.clone(), + src: src.config.name.clone(), peer: p.public_key, important, err, @@ -170,7 +170,7 @@ fn peer_contact<'a>( if let Some(pc) = gc.peers.get(&p.public_key) { if let Some(ref want_src) = &pc.source { - if *want_src != src.name { + if *want_src != src.config.name { return Err(Error::new("peer source not allowed", src, p, true)); } } -- cgit