Skip to content

Use SharedString::new_static for string literals#47865

Merged
Anthony-Eid merged 1 commit intozed-industries:mainfrom
tidely:shared-string-new-static
Jan 28, 2026
Merged

Use SharedString::new_static for string literals#47865
Anthony-Eid merged 1 commit intozed-industries:mainfrom
tidely:shared-string-new-static

Conversation

@tidely
Copy link
Contributor

@tidely tidely commented Jan 28, 2026

Basically just replaced SharedString::new(" with SharedShring::new_static(" which removes the allocation to Arc<str>.

Unfortunately this can't be enforced at compile time without trait specialization which is only available on nightly. You could assert that TypeId's differ, but TypeId only exists at runtime.

Release Notes:

  • N/A or Added/Fixed/Improved ...

basically just replaced `SharedString::new("` with
`SharedShring::new_static("`
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 28, 2026
@github-actions github-actions bot added the community champion Issues filed by our amazing community champions! 🫶 label Jan 28, 2026
@Anthony-Eid Anthony-Eid enabled auto-merge (squash) January 28, 2026 15:02
@Anthony-Eid
Copy link
Contributor

Thank you for contributing! This looks good to me, waiting for tests to pass to merge

@Anthony-Eid Anthony-Eid merged commit eb14c9d into zed-industries:main Jan 28, 2026
29 checks passed
naaiyy added a commit to Glass-HQ/Glass that referenced this pull request Feb 16, 2026
Key changes:
- Version bump v0.223
- Bold folder labels setting (zed-industries#47631) for project panel
- min_size/max_size style methods in GPUI (zed-industries#47775)
- Emoji typing fix (zed-industries#47835)
- Heap allocation reductions in GPUI (zed-industries#47858)
- Git graph: feature graph support (zed-industries#47861)
- Editor: select to start/end of larger syntax node (zed-industries#47571)
- Scroll position persistence moved to background with debounce (zed-industries#47834)
- Markdown: improved double-click word selection (zed-industries#47844)
- Language injections fix (zed-industries#46134)
- SharedString::new_static for string literals (zed-industries#47865)
- ACP registry improvements and agent deprecation banners

Conflict resolutions:
- Kept our version (0.0.1), not upstream's 0.223.0
- Removed vim settings from default.json, settings_content, settings_ui
- Took upstream's bold_folder_labels in project panel
- Removed deleted crate files (gpui, vim, util)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion Issues filed by our amazing community champions! 🫶

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants