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.
- Host: GitHub
- URL: https://github.com/deedlefake/uniq
- Owner: DeedleFake
- License: mit
- Created: 2017-04-04T15:02:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-04T15:18:47.000Z (about 8 years ago)
- Last Synced: 2025-02-10T11:12:20.971Z (4 months ago)
- Topics: fun, generics, holymoly, iterators, rust, ugly
- Language: Rust
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
}
}
```