Skip to content

Instantly share code, notes, and snippets.

fn str_split_once<'a>(s: &'a str, pat: &str) -> Option<(&'a str, &'a str)> {
match s.split(pat).collect::<Vec<_>>()[..] {
[x, y] => Some((x, y)),
_ => None
}
}
fn day8(part: char, s: &str) -> String{
if part == 'a' {
s.lines().flat_map(|line| {

Keybase proof

I hereby claim:

  • I am honnza on github.
  • I am honnza (https://keybase.io/honnza) on keybase.
  • I have a public key whose fingerprint is 592F C8B2 7014 4CB3 1B94 0EBF CE4A C7FB 35ED 0C69

To claim this, I am signing this object: