#AdventOfCode with #rust #Day6
-
#AdventOfCode with #rust #Day6
TIL I can .collect into a String, which is nice.
Also new thing I don't understand: I have the exact same code in two places to take some iterable and make it a number, but the iterables are not the same and I am can't understand how to extract a common function, need more thinking.https://gist.github.com/riffraff/d6c53e63f4652c8f31d9782d07f74aa1
-
#AdventOfCode with #rust #Day6
TIL I can .collect into a String, which is nice.
Also new thing I don't understand: I have the exact same code in two places to take some iterable and make it a number, but the iterables are not the same and I am can't understand how to extract a common function, need more thinking.https://gist.github.com/riffraff/d6c53e63f4652c8f31d9782d07f74aa1
ah, I need to pass a lifetime to make this work with references, or use .copied/.cloned apparently..
https://gist.github.com/riffraff/bd2aeb29ee7cb55dcbda225c1565a85a