[PR #1193] [MERGED] refactor(config): prefer serde(default) attr at struct-level #8241

Closed
opened 2026-05-23 02:57:02 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1193
Author: @JakeStanger
Created: 10/13/2025
Status: Merged
Merged: 10/13/2025
Merged by: @JakeStanger

Base: masterHead: refactor/serde-default


📝 Commits (1)

  • 3faff44 refactor(config): prefer serde(default) attr at struct-level

📊 Changes

25 files changed (+448 additions, -621 deletions)

View changed files

📝 src/clients/bluetooth.rs (+6 -2)
src/config/default.rs (+17 -0)
📝 src/config/mod.rs (+9 -46)
📝 src/modules/battery.rs (+13 -11)
📝 src/modules/bluetooth/config.rs (+71 -151)
📝 src/modules/cairo.rs (+11 -10)
📝 src/modules/clipboard.rs (+12 -13)
📝 src/modules/clock.rs (+4 -14)
📝 src/modules/custom/image.rs (+12 -5)
📝 src/modules/custom/progress.rs (+13 -3)
📝 src/modules/custom/slider.rs (+16 -9)
📝 src/modules/focused.rs (+6 -12)
📝 src/modules/keyboard.rs (+22 -38)
📝 src/modules/launcher/mod.rs (+30 -45)
📝 src/modules/menu/config.rs (+5 -23)
📝 src/modules/menu/mod.rs (+1 -1)
📝 src/modules/music/config.rs (+71 -111)
📝 src/modules/networkmanager.rs (+9 -4)
📝 src/modules/notifications.rs (+18 -38)
📝 src/modules/script.rs (+12 -11)

...and 5 more files

📄 Description

This removes a lot of default-oriented code, instead replacing it with a proper Default implementation and using #[serde(default)] at the struct level, instead of per-field.


🔄 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/ironbar/pull/1193 **Author:** [@JakeStanger](https://github.com/JakeStanger) **Created:** 10/13/2025 **Status:** ✅ Merged **Merged:** 10/13/2025 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `refactor/serde-default` --- ### 📝 Commits (1) - [`3faff44`](https://github.com/JakeStanger/ironbar/commit/3faff44d5576bcfc958453f04af9702f28ebfb01) refactor(config): prefer `serde(default)` attr at struct-level ### 📊 Changes **25 files changed** (+448 additions, -621 deletions) <details> <summary>View changed files</summary> 📝 `src/clients/bluetooth.rs` (+6 -2) ➕ `src/config/default.rs` (+17 -0) 📝 `src/config/mod.rs` (+9 -46) 📝 `src/modules/battery.rs` (+13 -11) 📝 `src/modules/bluetooth/config.rs` (+71 -151) 📝 `src/modules/cairo.rs` (+11 -10) 📝 `src/modules/clipboard.rs` (+12 -13) 📝 `src/modules/clock.rs` (+4 -14) 📝 `src/modules/custom/image.rs` (+12 -5) 📝 `src/modules/custom/progress.rs` (+13 -3) 📝 `src/modules/custom/slider.rs` (+16 -9) 📝 `src/modules/focused.rs` (+6 -12) 📝 `src/modules/keyboard.rs` (+22 -38) 📝 `src/modules/launcher/mod.rs` (+30 -45) 📝 `src/modules/menu/config.rs` (+5 -23) 📝 `src/modules/menu/mod.rs` (+1 -1) 📝 `src/modules/music/config.rs` (+71 -111) 📝 `src/modules/networkmanager.rs` (+9 -4) 📝 `src/modules/notifications.rs` (+18 -38) 📝 `src/modules/script.rs` (+12 -11) _...and 5 more files_ </details> ### 📄 Description This removes a lot of default-oriented code, instead replacing it with a proper `Default` implementation and using `#[serde(default)]` at the struct level, instead of per-field. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-23 02:57:02 +01:00
Sign in to join this conversation.
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/ironbar#8241
No description provided.