mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-31 01:24:31 +03:00
71c1e36d1e
This PR puts the `Theme` returned from the `theme` function behind an `Arc`. ### Motivation While working on wiring up window focus events for the `TitleBar` component we ran into issues where `theme` was holding an immutable borrow to the `ViewContext` for the entirety of the `render` scope, which prevented having mutable borrows in the same scope. ### Explanation To avoid this, we can make `theme` return an `Arc<Theme>` to allow for cheap clones and avoiding the issues with the borrow checker. Release Notes: - N/A Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> |
||
---|---|---|
.. | ||
examples | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |