Skip to content

Commit

Permalink
remove two doctests for grcov build
Browse files Browse the repository at this point in the history
  • Loading branch information
luk036 committed Jul 28, 2023
1 parent 6a5e435 commit 1f4f7d3
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/dllist.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// The `Dllink` type represents a doubly linked node with a pointer to the next and previous nodes and
/// a data field of type `T`.
///
///
/// Properties:
///
///
/// * `next`: A pointer to the next node in the doubly linked list.
/// * `prev`: A pointer to the previous node in the doubly linked list.
/// * `data`: The `data` property is a generic type `T` that represents the actual data stored in the
Expand All @@ -19,9 +19,9 @@ pub struct Dllink<T> {
impl<T: Default> Default for Dllink<T> {
/// The `default` function constructs a default `Dllink` object with a data field of type
/// `T::default()`.
///
///
/// Returns:
///
///
/// The `default()` function returns a `Dllink` object with default values.
/// Construct a default Dllink object
///
Expand Down Expand Up @@ -457,15 +457,6 @@ impl<'a, T> DllIterator<'a, T> {

impl<T> Dllist<T> {
/// Return a new DllIterator object
///
/// # Examples
///
/// ```rust
/// use ckpttn_rs::dllist::Dllist;
/// let mut a = Dllist::new(3);
/// let mut it = a.iter_mut();
/// assert_eq!(it.next().unwrap().data, 3);
/// ```
pub fn iter_mut(&mut self) -> DllIterator<T> {
DllIterator::new(&mut self.head)
}
Expand All @@ -475,15 +466,6 @@ impl<'a, T> Iterator for DllIterator<'a, T> {
type Item = &'a mut Dllink<T>;

/// Return a next item
///
/// # Examples
///
/// ```rust
/// use ckpttn_rs::dllist::Dllist;
/// let mut a = Dllist::new(3);
/// let mut it = a.iter_mut();
/// assert_eq!(it.next().unwrap().data, 3);
/// ```
fn next(&mut self) -> Option<Self::Item> {
if self.cur as *const Dllink<T> != self.link as *const Dllink<T> {
let res = self.cur;
Expand Down

0 comments on commit 1f4f7d3

Please sign in to comment.