Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 555a974

Browse files
fix: ensure tests pass when using no-default-features
1 parent 7e92eda commit 555a974

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ impl<W: Write> BufWriter<W> {
528528
/// enabled. The default capacity will differ between Windows and Unix-derivative targets.
529529
/// See [`Buffer::new_ringbuf()`](Buffer::new_ringbuf)
530530
/// or [the crate root docs](index.html#ringbuffers--slice-deque-feature) for more info.
531+
#[cfg(feature = "slice-deque")]
531532
pub fn new_ringbuf(inner: W) -> Self {
532533
Self::with_buffer(Buffer::new_ringbuf(), inner)
533534
}
@@ -544,6 +545,7 @@ impl<W: Write> BufWriter<W> {
544545
/// enabled. The capacity will be rounded up to the minimum size for the target platform.
545546
/// See [`Buffer::with_capacity_ringbuf()`](Buffer::with_capacity_ringbuf)
546547
/// or [the crate root docs](index.html#ringbuffers--slice-deque-feature) for more info.
548+
#[cfg(feature = "slice-deque")]
547549
pub fn with_capacity_ringbuf(cap: usize, inner: W) -> Self {
548550
Self::with_buffer(Buffer::with_capacity_ringbuf(cap), inner)
549551
}
@@ -749,11 +751,13 @@ impl<W: Write> LineWriter<W> {
749751
}
750752

751753
/// Wrap `inner` with the default buffer capacity using a ringbuffer.
754+
#[cfg(feature = "slice-deque")]
752755
pub fn new_ringbuf(inner: W) -> Self {
753756
Self::with_buffer(Buffer::new_ringbuf(), inner)
754757
}
755758

756759
/// Wrap `inner` with the given buffer capacity using a ringbuffer.
760+
#[cfg(feature = "slice-deque")]
757761
pub fn with_capacity_ringbuf(cap: usize, inner: W) -> Self {
758762
Self::with_buffer(Buffer::with_capacity_ringbuf(cap), inner)
759763
}

0 commit comments

Comments
 (0)