EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2
Read in commodities as `Rc<Commodity>`s directly
- 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
Assessment
This issue has not been assessed yet.