fn load_structures(&self) -> Result<()> {
        let structure_ids = self.0.read().esi_client.get_market_structure_ids()?;
        let structure_regions = get_structure_regions()?;
        let mut result: FnvHashMap<RegionID, FnvHashSet<LocationID>> = FnvHashMap::default();

        for id in structure_ids {
            // Check if official structure is in list from 3rd party API
            let region_option = structure_regions.get(&id);

            if let Some(region) = region_option {
                // Create empty set if needed
                if result.get(region).is_none() {
                    result.insert(*region, FnvHashSet::default());
                }

                result.get_mut(region).unwrap().insert(id);
            }
        }

        self.0.write().structures = result;

        Ok(())
    }
/// Load structures from ESI and 3rd party API
Load structures from ESI and 3rd party API
Load structures from ESI and 3rd party API
fn load_structures(&self) -> Result<()> {
        let structure_ids = self.0.read().esi_client.get_market_structure_ids()?;
        let structure_regions = get_structure_regions()?;
        let mut result: FnvHashMap<RegionID, FnvHashSet<LocationID>> = FnvHashMap::default();
        for id in structure_ids {
            // Check if official structure is in list from 3rd party API
            let region_option = structure_regions.get(&id);
            if let Some(region) = region_option {
                // Create empty set if needed
                if result.get(region).is_none() {
                    result.insert(*region, FnvHashSet::default());
                }
                result.get_mut(region).unwrap().insert(id);
            }
        }
        self.0.write().structures = result;
        Ok(())
    }
fn load_structures ( & self ) -> Result < ( ) > { let structure_ids = self . 0 . read ( ) . esi_client . get_market_structure_ids ( ) ? ; let structure_regions = get_structure_regions ( ) ? ; let mut result : FnvHashMap < RegionID , FnvHashSet < LocationID > > = FnvHashMap :: default ( ) ; for id in structure_ids { // Check if official structure is in list from 3rd party API let region_option = structure_regions . get ( & id ) ; if let Some ( region ) = region_option { // Create empty set if needed if result . get ( region ) . is_none ( ) { result . insert ( * region , FnvHashSet :: default ( ) ) ; } result . get_mut ( region ) . unwrap ( ) . insert ( id ) ; } } self . 0 . write ( ) . structures = result ; Ok ( ( ) ) }
Load structures from ESI and 3rd party API
Load structures from ESI and 3rd party API
&self
&self