Replace usage of once_cell with stabilized alternatives from std. by zekefast · Pull Request #803 · Relm4/Relm4 · GitHub
Skip to content

Replace usage of once_cell with stabilized alternatives from std. - #803

Open
zekefast wants to merge 5 commits into
mainfrom
replace_usage_of_once_cell_with_stabilized_alternatives_from_std
Open

zekefast wants to merge 5 commits into
mainfrom
replace_usage_of_once_cell_with_stabilized_alternatives_from_std

Conversation

@zekefast

Copy link
Copy Markdown
Contributor

Summary

Migrate from once_cell types to those provided by std. Remove once_cell dependency.

NOTE: This PR is blocked by stabilization of lazy_get feature which probably has to be stabilized soon.

Changes

API Breaking Changes

  • Remove public re-export of once_cell crate from relm4 crate.

Related Pull Requests

Checklist

  • cargo fmt
  • cargo clippy
  • cargo test
  • updated CHANGES.md

@zekefast
zekefast force-pushed the unify_dependencies_management_by_using_workspace_dependencies branch from 48c36f5 to 3f948f6 Compare November 25, 2025 18:51
Base automatically changed from unify_dependencies_management_by_using_workspace_dependencies to main November 25, 2025 19:02
@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch 3 times, most recently from a9d7221 to 9068cff Compare November 30, 2025 18:49
@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch 4 times, most recently from ae1e349 to 9f1ac08 Compare December 17, 2025 15:39
@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch 4 times, most recently from b3dcab4 to 12b46ac Compare December 27, 2025 22:55
@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch 2 times, most recently from e4c9e60 to e968470 Compare January 10, 2026 22:57
@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch from e968470 to 3194438 Compare January 15, 2026 23:06
@zekefast

Copy link
Copy Markdown
Contributor Author

@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch 2 times, most recently from 475b7df to e8ff48d Compare January 24, 2026 23:33
@zekefast zekefast self-assigned this Jan 25, 2026
LazyLock was stabilized in Rust 1.80 and replaces once_cell::sync::Lazy.

The changes requires "lazy_get" feature which I think has to be
stabilized very soon (rust-lang/rust#129333).
So, PR will be blocked for sometime by the arrival of "lazy_get" on
stable version Rust.

References:
- https://blog.rust-lang.org/2024/07/25/Rust-1.80.0/#lazycell-and-lazylock
- lazy_get feature: rust-lang/rust#129333
- https://doc.rust-lang.org/std/sync/struct.LazyLock.html
- https://docs.rs/once_cell/1.21.3/once_cell/sync/struct.Lazy.html
WARNING: this is public API breaking change!
Additional changes:
- Update Cargo.lock.
@zekefast
zekefast force-pushed the replace_usage_of_once_cell_with_stabilized_alternatives_from_std branch from e8ff48d to 8c4519a Compare February 1, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant