Skip to content

Commit 90c0214

Browse files
committed
fix: impl Trace and Finalize for Path and PathBuf
1 parent 0442fb6 commit 90c0214

File tree

1 file changed

+16
-0
lines changed
  • oscars/src/collectors/mark_sweep

1 file changed

+16
-0
lines changed

oscars/src/collectors/mark_sweep/trace.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,22 @@ unsafe impl<K: Eq + Hash + Trace, V: Trace, S: BuildHasher> Trace
398398
});
399399
}
400400

401+
#[cfg(feature = "std")]
402+
impl Finalize for Path {}
403+
#[cfg(feature = "std")]
404+
// SAFETY: `Path` doesn't have any inner nodes that need to be marked
405+
unsafe impl Trace for Path {
406+
empty_trace!();
407+
}
408+
409+
#[cfg(feature = "std")]
410+
impl Finalize for PathBuf {}
411+
#[cfg(feature = "std")]
412+
// SAFETY: `PathBuf` doesn't have any inner nodes that need to be marked
413+
unsafe impl Trace for PathBuf {
414+
empty_trace!();
415+
}
416+
401417
#[cfg(feature = "std")]
402418
impl<K: Eq + Hash + Trace, V: Trace, S: BuildHasher> Finalize for HashMap<K, V, S> {}
403419
#[cfg(feature = "std")]

0 commit comments

Comments
 (0)