+
+fn handle_notif(state: &mut WatchState, new_list: List) {
+ if new_list == state.prev_list {
+ return;
+ }
+ let update = Update {
+ interfaces: new_list.0.clone(),
+ diff: new_list.diff_from(&state.prev_list),
+ };
+ (state.cb)(update);
+ state.prev_list = new_list;
+}