/// Check if the service table has been updated and send an UPDATE message
/// if needed.
Check if the service table has been updated and send an UPDATE message
if needed.
Check if the service table has been updated and send an UPDATE message if needed .
fn check_update(&mut self, event_loop: &mut EventLoop<Self>) {
        let cur_version;
        let svc_table;
        {
            let app_context = self.app_context.lock()
                .unwrap();
            let config  = &app_context.config;
            cur_version = config.version();
            svc_table   = config.service_table()
                .clone();
        }
        let send_update = match self.last_update {
            Some(sent_version) => cur_version > sent_version,
            None => true
        };
        if send_update {
            self.send_update_message(svc_table, event_loop);
            self.last_update = Some(cur_version);
        }
    }
fn check_update ( & mut self , event_loop : & mut EventLoop < Self > ) { let cur_version ; let svc_table ; { let app_context = self . app_context . lock ( ) . unwrap ( ) ; let config = & app_context . config ; cur_version = config . version ( ) ; svc_table = config . service_table ( ) . clone ( ) ; } let send_update = match self . last_update { Some ( sent_version ) => cur_version > sent_version , None => true } ; if send_update { self . send_update_message ( svc_table , event_loop ) ; self . last_update = Some ( cur_version ) ; } }
Check if the service table has been updated and send an UPDATE message
if needed.
Check if the service table has been updated and send an UPDATE message if needed .
&mut self
event_loop
&mut EventLoop<Self>