tailwag_utils 0.3.0

A collection of assorted utility functions / traits. Part of the tailwag stack.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::iter::Peekable;

pub trait HasNext {
    fn has_next(&mut self) -> bool;
}

impl<I> HasNext for Peekable<I>
where
    I: Iterator,
{
    fn has_next(&mut self) -> bool {
        self.peek().is_some()
    }
}