mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[PR #1489] refactor(container + bm): use Arc<str> and WsElementId for Workspace Element IDs
#1426
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1489
Author: @JustForFun88
Created: 6/20/2025
Status: 🔄 Open
Base:
master← Head:use_id_istead_of_str📝 Commits (2)
c279917UseArc<str>andWsElementIdinstead ofStringbafb615make serialize and deserialize compact📊 Changes
4 files changed (+84 additions, -45 deletions)
View changed files
📝
komorebi/src/border_manager/border.rs(+5 -4)📝
komorebi/src/border_manager/mod.rs(+58 -35)📝
komorebi/src/container.rs(+19 -4)📝
komorebi/src/stackbar_manager/mod.rs(+2 -2)📄 Description
This pull request switches to
Arc<str>for container IDs and replaces plain strings with theWsElementIdenum for workspace elements in theBorderstructure.Motivation
StringwithArc<str>for container IDs makes all cloning cheap.WsElementIdenum eliminates heap allocation for floating window IDs in theBorderstructure.Benefits
Notes
Deserialization from legacy JSON (string IDs) is preserved by custom (de)serializers.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.