Closed moulins closed 1 year ago
LGTM, I almost asked why we can't use the automatic Collect
impl on DynamicRootSet
before I remembered that the Collect
derive doesn't work within the gc-arena crate itself 🤦♀️. It's probably not worth fixing that since the implementations are so minimal, but it is kind of annoying.
Fwiw, it would be pretty easy to make the derive macro work in gc-arena itself by just adding an extern crate self as gc_arena;
alias to the crate root of gc-arena.
Though its questionable whether you should use it if you don't have to since that would make gc-arena itself depend on syn.
Yeah I know that would make it work and I thought about that, it's just always a pretty minor thing so it never feels worth it.
Using the derive macro would only allow getting rid of the trivial impl Collect for DynamicRootSet
, so it's not even that useful IMHO.
DynamicRootSet::{contains, try_fetch}
;DynamicRoot{, Set}
;unlock!
to removeRefCell
runtime checks during fetching.