diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/main.rs | 4 | ||||
-rwxr-xr-x | util/one | 7 | ||||
-rwxr-xr-x | util/two | 7 |
3 files changed, 2 insertions, 16 deletions
diff --git a/util/main.rs b/util/main.rs index 2cad662..8b1acab 100644 --- a/util/main.rs +++ b/util/main.rs @@ -2,7 +2,7 @@ use std::env; use std::fs; fn main() { - let args = env::args().nth(1).expect(""); - let input = fs::read_to_string(args).expect(""); + let args = env::args().nth(1).unwrap(); + let input = fs::read_to_string(args).unwrap(); println!("{}", input); } diff --git a/util/one b/util/one deleted file mode 100755 index 6b7db35..0000000 --- a/util/one +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source "vars" -LEVEL="1" -SUBMIT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/answer" - -curl $SUBMIT_URL --cookie "session=${TOKEN}" --data "level=${LEVEL}&answer=$1" | rg -C 1 "main" diff --git a/util/two b/util/two deleted file mode 100755 index 8dd0080..0000000 --- a/util/two +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source "vars" -LEVEL="2" -SUBMIT_URL="https://adventofcode.com/${YEAR}/day/$((10#${DAY}))/answer" - -curl $SUBMIT_URL --cookie "session=${TOKEN}" --data "level=${LEVEL}&answer=$1" | rg -C 1 "main" |