Skip to content

Commit ef60d14

Browse files
committed
mark private functions only used by tests as #[cfg(test)]
1 parent 784f2a7 commit ef60d14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ impl SmolBitSet {
252252
unsafe { self.ptr.as_ptr().add(1) }
253253
}
254254

255+
#[cfg(test)]
255256
#[inline]
256257
fn as_slice(&self) -> &[BitSliceType] {
257258
if self.is_inline() {
@@ -266,6 +267,7 @@ impl SmolBitSet {
266267
unsafe { slice::from_raw_parts(self.data_ptr_unchecked(), self.len_unchecked()) }
267268
}
268269

270+
#[cfg(test)]
269271
#[inline]
270272
fn as_slice_mut(&mut self) -> &mut [BitSliceType] {
271273
if self.is_inline() {
@@ -282,6 +284,7 @@ impl SmolBitSet {
282284

283285
/// # Warning
284286
/// `highest_bit` is 1 indexed, so the least significant bit is 1, not 0!
287+
#[cfg(test)]
285288
#[inline]
286289
fn spill(&mut self, highest_bit: usize) {
287290
if !self.is_inline() {

0 commit comments

Comments
 (0)