An open API service indexing awesome lists of open source software.

https://github.com/deedlefake/uniq

A Rust crate that extends Iterators to allow for skipping duplicates. Just for fun.
https://github.com/deedlefake/uniq

fun generics holymoly iterators rust ugly

Last synced: about 2 months ago
JSON representation

A Rust crate that extends Iterators to allow for skipping duplicates. Just for fun.

Awesome Lists containing this project

README

        

uniq
====

A Rust crate that extends Iterators to make it easier to skip duplicates. I wrote this just for the heck of it. I don't intend for it to ever be used.

Example
-------

```
use std::io::{stdin, BufRead};
use std::fmt::{Display};

extern crate uniq;
use uniq::{UniqIterator};

fn panic(e: Result) -> T where E: Display {
match e {
Ok(e) => e,
Err(err) => panic!("{}", err),
}
}

fn main() {
let stdin = stdin();
for line in stdin.lock().lines().map(panic).uniq() {
println!("{}", line);
}
}
```