kyren / gc-arena

Incremental garbage collection from safe Rust
Creative Commons Zero v1.0 Universal
438 stars 36 forks source link

Add more useful Debug, Pointer, and Display impls #24

Closed redacted-moose closed 1 year ago

redacted-moose commented 1 year ago

This adds more useful Debug and Pointer impls for the Gc and GcCell types, and adds a Display impl for the Gc type. These impls mirror the implementations for Rc and RefCell from the standard library.

Note: this does mean that you will no longer be able to derive Debug on types that contain a Gc ~or GcCell~ if they themselves contain types that don't implement Debug. You still can manually implement Debug in this case however.

kyren commented 1 year ago

Note: this does mean that you will no longer be able to derive Debug on types that contain a Gc or GcCell if they themselves contain types that don't implement Debug. You still can manually implement Debug in this case however.

I think this is completely fine and normal.