/// Writes the intl info to persistent storage.
///
/// TODO(fxb/41639): inline this method into set_time_zone
Writes the intl info to persistent storage.
TODO(fxb/41639): inline this method into set_time_zone
Writes the intl info to persistent storage . TODO ( fxb / 41639 ) : inline this method into set_time_zone
fn persist_intl_info(&self, info: IntlInfo, responder: SettingRequestResponder) {
        let storage_clone = self.storage.clone();
        // Spin off a separate thread to persist the value.
        fasync::spawn(async move {
            let mut storage_lock = storage_clone.lock().await;
            let write_request = storage_lock.write(&info, false).await;
            let _ = match write_request {
                Ok(_) => responder.send(Ok(None)),
                Err(_) => responder.send(Err(SwitchboardError::StorageFailure {
                    setting_type: SettingType::Intl,
                })),
            };
        });
    }
fn persist_intl_info ( & self , info : IntlInfo , responder : SettingRequestResponder ) { let storage_clone = self . storage . clone ( ) ; // Spin off a separate thread to persist the value. fasync :: spawn ( async move { let mut storage_lock = storage_clone . lock ( ) . await ; let write_request = storage_lock . write ( & info , false ) . await ; let _ = match write_request { Ok ( _ ) => responder . send ( Ok ( None ) ) , Err ( _ ) => responder . send ( Err ( SwitchboardError :: StorageFailure { setting_type : SettingType :: Intl , } ) ) , } ; } ) ; }
Writes the intl info to persistent storage.
Writes the intl info to persistent storage .
&self
info
IntlInfo
responder
SettingRequestResponder