Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Use custom `Serialize` implementations for metric types

Open
#1,159 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start by tracing MetricTrait serialization and the current value() call sites, then inspect NPVMetric's handling of a zero denominator. Confirm how erased-serde is used and verify that custom Serialize implementations are actually selected and expose the fallback-comparison case to users.

Written by the indexing model from the issue text.

Description

muse xiii

While we are using the erased-serde crate, which should allow us to do this, we don't actually have custom Serialize implementations for MetricTrait types anyway (edit: we do, but we're not using them); we use the value() method instead. We should fix this. In particular, this would be useful for NPVMetric, to make it clear to the user when we are using the fallback comparison because the denominator is zero.

Dominant language
Rust
Stars
8
Forks
5
Avg merge
11h 31m
Merged PRs (30d)
33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EnergySystemsModellingLab/MUSE2

All issues in EnergySystemsModellingLab/MUSE2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.