Skip to content

Commit 5fd3697

Browse files
remove dead code
1 parent 8308370 commit 5fd3697

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

netwatch/src/interfaces.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,6 @@ pub struct State {
179179
///
180180
/// When set, its value is the map key into `interface` and `interface_ips`.
181181
pub default_route_interface: Option<String>,
182-
183-
/// The HTTP proxy to use, if any.
184-
pub http_proxy: Option<String>,
185-
186-
/// The URL to the Proxy Autoconfig URL, if applicable.
187-
pub pac: Option<String>,
188182
}
189183

190184
impl fmt::Display for State {
@@ -245,8 +239,6 @@ impl State {
245239
have_v6,
246240
is_expensive: false,
247241
default_route_interface,
248-
http_proxy: None,
249-
pac: None,
250242
}
251243
}
252244

@@ -262,8 +254,6 @@ impl State {
262254
have_v4: true,
263255
is_expensive: false,
264256
default_route_interface: Some(ifname),
265-
http_proxy: None,
266-
pac: None,
267257
}
268258
}
269259

@@ -282,8 +272,6 @@ impl State {
282272
|| self.have_v4 != old.have_v4
283273
|| self.is_expensive != old.is_expensive
284274
|| self.default_route_interface != old.default_route_interface
285-
|| self.http_proxy != old.http_proxy
286-
|| self.pac != old.pac
287275
{
288276
return true;
289277
}

netwatch/src/netmon.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ impl Monitor {
9494

9595
#[cfg(test)]
9696
mod tests {
97-
use n0_future::StreamExt;
9897
use n0_watcher::Watcher as _;
9998

10099
use super::*;
@@ -104,19 +103,7 @@ mod tests {
104103
let mon = Monitor::new().await.unwrap();
105104
let sub = mon.subscribe();
106105

107-
let mut current = sub.get().unwrap();
106+
let current = sub.get().unwrap();
108107
println!("current state: {}", current);
109-
let mut stream = sub.stream();
110-
111-
for _ in 0..10 {
112-
let state = stream.next().await.unwrap();
113-
println!(
114-
"CHANGE DETECTED: major?: {}\n{}\n",
115-
state.is_major_change(&current),
116-
state
117-
);
118-
119-
current = state;
120-
}
121108
}
122109
}

0 commit comments

Comments
 (0)