We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f57cfb commit 5bffb96Copy full SHA for 5bffb96
src/lib.rs
@@ -1541,7 +1541,12 @@ impl<T> ThinVec<T> {
1541
1542
#[cfg(feature = "gecko-ffi")]
1543
#[inline]
1544
+ #[allow(unused_unsafe)]
1545
fn is_singleton(&self) -> bool {
1546
+ // NOTE: the tests will complain that this "unsafe" isn't needed, but it *IS*!
1547
+ // In production this refers to an *extern static* which *is* unsafe to reference.
1548
+ // In tests this refers to a local static because we don't have Firefox's codebase
1549
+ // providing the symbol!
1550
unsafe { self.ptr.as_ptr() as *const Header == &EMPTY_HEADER }
1551
}
1552
0 commit comments