Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a couple of changes.
First, it changes the template to remove the bin and src folder. Instead it appends to Cargo.toml on the path to the binaries for the respective days. It might be controversial to remove the src folder. I am not sure if I want to do that or not, but I at least want to remove the bin folder.
I also added a check to make sure that we don't override a project if it already exists.
There is also one breaking change here. Removal of the year argument to run. However, I think calculating it from the directory is better, as it may lead to less undefined behaviour. Currently, if I have a folder
year_2020
, and I runcargo aoc run -d 1
inside that folder, it will run the correct day from that year. However, since I forgot to add theyear
flag, it will actually download the input file from 2023 (current year)!. This changes that behaviour to correctly parese the folder name to download the correct input