zed/crates/assistant2
Michael Sloan a94afbc062
Switch from Arc/RwLock to Rc/RefCell for CodeContextMenu (#22035)
`CodeContextMenu` is always accessed on one thread, so only `Rc`s and
`Rc<RefCell<_>>` are needed. There should be tiny performance benefits
from this. The main benefit of this is that when seeing code accessing a
`RwLock` it would be reasonable to wonder whether it will block. The
only potential downside is the potential for panics due to overlapping
borrows of the RefCells. I think this is an acceptable risk because most
errors of this nature will be local or will be caught by clippy via the
check for holding a RefCell reference over an `await`.

Release Notes:

- N/A
2024-12-16 01:50:21 -07:00
..
src Switch from Arc/RwLock to Rc/RefCell for CodeContextMenu (#22035) 2024-12-16 01:50:21 -07:00
Cargo.toml assistant2: Add ability to fetch URLs as context (#21988) 2024-12-13 15:03:55 -05:00
LICENSE-GPL Break ground on assistant2 (#21109) 2024-11-23 11:24:52 -05:00