pub fn read_categories(cfg: &Config) -> Result<CategoryLookup> {
    let categories = category::read_categories(cfg)?;
    let mut lookup = CategoryLookup::new();

    for category in categories {
        lookup.add(category)?;
    }

    Ok(lookup)
}
/// Read all categories and return a populated lookup structure
Read all categories and return a populated lookup structure
Read all categories and return a populated lookup structure
pub fn read_categories(cfg: &Config) -> Result<CategoryLookup> {
    let categories = category::read_categories(cfg)?;
    let mut lookup = CategoryLookup::new();
    for category in categories {
        lookup.add(category)?;
    }
    Ok(lookup)
}
pub fn read_categories ( cfg : & Config ) -> Result < CategoryLookup > { let categories = category :: read_categories ( cfg ) ? ; let mut lookup = CategoryLookup :: new ( ) ; for category in categories { lookup . add ( category ) ? ; } Ok ( lookup ) }
Read all categories and return a populated lookup structure
Read all categories and return a populated lookup structure
cfg
&Config