@@ -528,6 +528,7 @@ impl<W: Write> BufWriter<W> {
528
528
/// enabled. The default capacity will differ between Windows and Unix-derivative targets.
529
529
/// See [`Buffer::new_ringbuf()`](Buffer::new_ringbuf)
530
530
/// or [the crate root docs](index.html#ringbuffers--slice-deque-feature) for more info.
531
+ #[ cfg( feature = "slice-deque" ) ]
531
532
pub fn new_ringbuf ( inner : W ) -> Self {
532
533
Self :: with_buffer ( Buffer :: new_ringbuf ( ) , inner)
533
534
}
@@ -544,6 +545,7 @@ impl<W: Write> BufWriter<W> {
544
545
/// enabled. The capacity will be rounded up to the minimum size for the target platform.
545
546
/// See [`Buffer::with_capacity_ringbuf()`](Buffer::with_capacity_ringbuf)
546
547
/// or [the crate root docs](index.html#ringbuffers--slice-deque-feature) for more info.
548
+ #[ cfg( feature = "slice-deque" ) ]
547
549
pub fn with_capacity_ringbuf ( cap : usize , inner : W ) -> Self {
548
550
Self :: with_buffer ( Buffer :: with_capacity_ringbuf ( cap) , inner)
549
551
}
@@ -749,11 +751,13 @@ impl<W: Write> LineWriter<W> {
749
751
}
750
752
751
753
/// Wrap `inner` with the default buffer capacity using a ringbuffer.
754
+ #[ cfg( feature = "slice-deque" ) ]
752
755
pub fn new_ringbuf ( inner : W ) -> Self {
753
756
Self :: with_buffer ( Buffer :: new_ringbuf ( ) , inner)
754
757
}
755
758
756
759
/// Wrap `inner` with the given buffer capacity using a ringbuffer.
760
+ #[ cfg( feature = "slice-deque" ) ]
757
761
pub fn with_capacity_ringbuf ( cap : usize , inner : W ) -> Self {
758
762
Self :: with_buffer ( Buffer :: with_capacity_ringbuf ( cap) , inner)
759
763
}
0 commit comments