[PR #8] [MERGED] fix: fix compilation for --no-default-features #11

Closed
opened 2026-05-22 22:05:01 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/universal-config-rs/pull/8
Author: @Rodrigodd
Created: 4/9/2025
Status: Merged
Merged: 4/14/2025
Merged by: @JakeStanger

Base: masterHead: fix-no-default-features


📝 Commits (1)

  • fe3ef81 fix: fix compilation for --no-default-features

📊 Changes

1 file changed (+5 additions, -4 deletions)

View changed files

📝 src/lib.rs (+5 -4)

📄 Description

When no features are enabled the Format enum is empty. This commit fixes a error with type inference and errors with matching a reference to the empty enum by dereferencing them first.

This fixes the compilation of ironbar with --no-default-features.

I test the changes with the following script:

#!/bin/sh

check() {
    echo "Checking $1"
    cargo check --no-default-features --features "$@" 2>/dev/null 2>/dev/null
}

cargo check --message-format=short \
&& check '' \
&& check json \
&& check yaml \
&& check toml \
&& check corn \
&& check ron \
&& echo "Check passed" \
|| echo "Check failed"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/universal-config-rs/pull/8 **Author:** [@Rodrigodd](https://github.com/Rodrigodd) **Created:** 4/9/2025 **Status:** ✅ Merged **Merged:** 4/14/2025 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `fix-no-default-features` --- ### 📝 Commits (1) - [`fe3ef81`](https://github.com/JakeStanger/universal-config-rs/commit/fe3ef81eed42d1c84c46a8272c81971966c45a12) fix: fix compilation for --no-default-features ### 📊 Changes **1 file changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/lib.rs` (+5 -4) </details> ### 📄 Description When no features are enabled the Format enum is empty. This commit fixes a error with type inference and errors with matching a reference to the empty enum by dereferencing them first. This fixes the compilation of [ironbar](https://github.com/JakeStanger/ironbar) with `--no-default-features`. I test the changes with the following script: ```sh #!/bin/sh check() { echo "Checking $1" cargo check --no-default-features --features "$@" 2>/dev/null 2>/dev/null } cargo check --message-format=short \ && check '' \ && check json \ && check yaml \ && check toml \ && check corn \ && check ron \ && echo "Check passed" \ || echo "Check failed" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 22:05:01 +01:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/universal-config-rs#11
No description provided.