We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80775db commit 003ca72Copy full SHA for 003ca72
src/bin/06.rs
@@ -34,7 +34,7 @@ fn parse_data(input: &str) -> DataType {
34
let mut obstructions = FastSet::new();
35
36
let height = input.lines().count();
37
- let width = input.split_once("\n").unwrap().0.len();
+ let width = input.lines().next().unwrap().len();
38
39
for (y, line) in input.lines().enumerate() {
40
for (x, v) in line.bytes().enumerate() {
0 commit comments