EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2

Read in commodities as `Rc<Commodity>`s directly

Open
#605 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
8
Forks
5
Avg merge
1d 2m
Merged PRs (30d)
37

Description

Annoyingly, when we initially read in the commodities they're stored in an `IndexMap` then we turn it into an `IndexMap>` (i.e. a `CommodityMap`), otherwise I would have just used a `CommodityMap`.

I think I did this because I was under the impression that you couldn't really modify `Rc` things easily (and we need to do that to assign various fields to the commodities), but it looks like there is this function that does what we need: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.make_mut

_Originally posted by @alexdewar in https://github.com/EnergySystemsModellingLab/MUSE_2.0/pull/599#discussion_r2128775599_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.