aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface
diff options
context:
space:
mode:
authorJake McGinty <me@jake.su>2018-03-25 15:51:38 -0700
committerJake McGinty <me@jake.su>2018-03-25 15:52:16 -0700
commit1d4e0eddc6dc0a82b8ee5cf6fba5399535a6f5a9 (patch)
tree14cfb03680e11220ba3ac99c196424eff75787b3 /src/interface
parenttools: more accurate routing in wg-quick.bash (diff)
downloadwireguard-rs-1d4e0eddc6dc0a82b8ee5cf6fba5399535a6f5a9.tar.xz
wireguard-rs-1d4e0eddc6dc0a82b8ee5cf6fba5399535a6f5a9.zip
clippy: remove unnecessary iter()
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/config.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/interface/config.rs b/src/interface/config.rs
index c935b13..4836862 100644
--- a/src/interface/config.rs
+++ b/src/interface/config.rs
@@ -166,10 +166,9 @@ impl ConfigurationService {
let mut state = state.borrow_mut();
match command {
Command::Set(_version, items) => {
- for ref item in items.iter() {
- match Self::handle_update(&mut state, item) {
- Err(_) => return future::ok("errno=1\nerrno=1\n\n".into()),
- _ => {}
+ for item in &items {
+ if Self::handle_update(&mut state, item).is_err() {
+ return future::ok("errno=1\nerrno=1\n\n".into());
}
}
tx.clone().send_all(stream::iter_ok(items)).wait().unwrap();