kyren / gc-arena

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

Add `Collect` impls for more types. #49

Closed zachs18 closed 1 year ago

zachs18 commented 1 year ago

Replace impl<T: Collect> Collect for Box<[T]> with impl<T: Collect> Collect for [T]: allows the existing Box<T: ?Sized + Collect> impl to work for Box<[T]>, as well as the existing Rc<T: ?Sized + Collect> impl to work for Rc<[T]>, etc.

Also implements Collect for some additional 'static types: str, CStr, CString, Path, PathBuf, OsStr, OsString.

kyren commented 1 year ago

Thank you, this LGTM!