EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE2

Consider using `nonempty` crate

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

Description

I've come across this crate and it seems like it could be useful: https://crates.io/crates/nonempty

It provides a `NonEmpty` type, which behaves (mostly) like a `Vec`, but guarantees that there is at least one element. Specifically for the input layer, there are a bunch of places where we want to ensure that `Vec`s are non-empty and this could be a nice way of expressing it...

What do you think @dalonsoa?

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.