bevyengine / bevyengine/bevy

Handle optional properties in bevy_settings

Open
#25,762 0 comments 0 reactions 0 assignees View on GitHub
A-Settings C-Feature D-Modest S-Needs-Design X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
4d 8m
Merged PRs (30d)
147

Description

TOML has no `none` token, so field of type `Option` cannot be encoded properly in bevy_settings.

There are various workarounds, such as using an empty table to represent an "empty" value.

A different approach is to omit the key altogether, although this leads to an inconsistency with how other fields are handled, since it means that previous values would be preserved instead of being set to None.

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.