You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
advent-of-code/2016/rust/src/day_09.rs

38 lines
644 B

use std::str;
use errors::*;
pub fn solve(_: &str) -> Result<String> {
Ok("".into())
}
struct Decompress<'a> {
chars: str::Chars<'a>,
}
impl<'a> Decompress<'a> {
fn new(input: &'a str) -> Self {
Decompress{chars: input.chars()}
}
}
impl<'a> Iterator for Decompress<'a> {
type Item = char;
fn next(&mut self) -> Option<char> {
self.chars.next()
}
}
#[cfg(test)]
mod tests {
use super::Decompress;
#[test]
fn test_no_markers() {
let mut decompress = Decompress::new("ADVENT");
let output: String = decompress.collect();
assert_eq!(output, "ADVENT");
}
}