/// Parse input to earliest timestamp and vector of ids as `Option<i64>`.
///
/// Ids `"x"` result in `None` values, integer ids result in `Some<i64>` values.
Parse input to earliest timestamp and vector of ids as `Option`.
Parse input to earliest timestamp and vector of ids as ` Option ` .
pub fn parse(content: &str) -> (i64, Vec<Option<i64>>) {
    let mut lines = content.lines();
    let earliest = lines.next().expect("No earliest value")
        .parse().expect("Could not parse earliest value");
    let ids_line = String::from(lines.next().expect("No ids"));
    let ids = ids_line.split(",").map(
        |id| match id {
            "x" => None,
            v => Some(v.parse().expect("Could not parse id")),
        }
    ).collect();
    (earliest, ids)
}
pub fn parse ( content : & str ) -> ( i64 , Vec < Option < i64 > > ) { let mut lines = content . lines ( ) ; let earliest = lines . next ( ) . expect ( " " ) . parse ( ) . expect ( " " ) ; let ids_line = String :: from ( lines . next ( ) . expect ( " " ) ) ; let ids = ids_line . split ( " " ) . map ( | id | match id { " " => None , v => Some ( v . parse ( ) . expect ( " " ) ) , } ) . collect ( ) ; ( earliest , ids ) }
Parse input to earliest timestamp and vector of ids as `Option<i64>`.
Parse input to earliest timestamp and vector of ids as ` Option<i64 > ` .
content
&str