Simplify listener definition (#681)

This simplifies the logic to build the listener by using more clap
features instead of manually accessing the PORT environment variable.
This also removes unnecessary `unwrap_or` calls that set defaults that
are already set by clap.
This commit is contained in:
Spenser Black 2023-01-12 03:41:59 -05:00 committed by GitHub
parent e238a7b168
commit 2a54043afc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -10,7 +10,7 @@ edition = "2021"
[dependencies]
askama = { version = "0.11.1", default-features = false }
cached = "0.40.0"
clap = { version = "4.0.24", default-features = false, features = ["std"] }
clap = { version = "4.0.24", default-features = false, features = ["std", "env"] }
regex = "1.7.0"
serde = { version = "1.0.147", features = ["derive"] }
cookie = "0.16.1"