Minor fixes

This commit is contained in:
Malte Tammena 2022-12-03 12:36:59 +01:00
parent 52866662f4
commit 730ba8e885
3 changed files with 7 additions and 3 deletions

View file

@ -3,7 +3,9 @@ name = "day02-gen-problem"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.nix]
build = true
app = true
[dependencies]
rand = "0.8.5"

View file

@ -3,7 +3,9 @@ name = "day03-gen-problem"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.nix]
build = true
app = true
[dependencies]
clap = { version = "4.0.29", features = ["derive", "wrap_help"] }

View file

@ -39,7 +39,7 @@ struct Args {
impl Args {
pub fn half_line_range(&self) -> Range<usize> {
self.min_line..self.max_line
(self.min_line / 2)..(self.max_line / 2)
}
}