From 0f9b9a5fb7348471e9d51bcc298667c71647e0e1 Mon Sep 17 00:00:00 2001 From: blake2-ppc Date: Thu, 11 Jul 2013 16:17:51 +0200 Subject: [PATCH] extra: Mention extra::container::Deque trait in doc for RingBuf and DList --- src/libextra/dlist.rs | 5 ++++- src/libextra/ringbuf.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libextra/dlist.rs b/src/libextra/dlist.rs index 18629f8597c..fc6d05fcb58 100644 --- a/src/libextra/dlist.rs +++ b/src/libextra/dlist.rs @@ -11,6 +11,9 @@ //! A doubly-linked list with owned nodes. //! //! The DList allows pushing and popping elements at either end. +//! +//! DList implements the trait Deque. It should be imported with `use +//! extra::container::Deque`. // DList is constructed like a singly-linked list over the field `next`. @@ -27,7 +30,7 @@ use std::iterator::FromIterator; use container::Deque; -/// A doubly-linked list +/// A doubly-linked list. pub struct DList { priv length: uint, priv list_head: Link, diff --git a/src/libextra/ringbuf.rs b/src/libextra/ringbuf.rs index 28eab9d9012..1d429a18a5c 100644 --- a/src/libextra/ringbuf.rs +++ b/src/libextra/ringbuf.rs @@ -9,6 +9,9 @@ // except according to those terms. //! A double-ended queue implemented as a circular buffer +//! +//! RingBuf implements the trait Deque. It should be imported with `use +//! extra::container::Deque`. use std::num; use std::util; @@ -21,7 +24,7 @@ use container::Deque; static INITIAL_CAPACITY: uint = 8u; // 2^3 static MINIMUM_CAPACITY: uint = 2u; -#[allow(missing_doc)] +/// RingBuf is a circular buffer that implements Deque. #[deriving(Clone)] pub struct RingBuf { priv nelts: uint,