Update dependencies; remove usage of flatten()

This commit is contained in:
Aram 🍐 2024-01-06 23:08:24 -05:00
parent 292cdecd87
commit b79a6af150
4 changed files with 84 additions and 91 deletions

View file

@ -8,8 +8,7 @@ fn main() -> rups::Result<()> {
let host = env::var("NUT_HOST").unwrap_or_else(|_| "localhost".into());
let port = env::var("NUT_PORT")
.ok()
.map(|s| s.parse::<u16>().ok())
.flatten()
.and_then(|s| s.parse::<u16>().ok())
.unwrap_or(3493);
let username = env::var("NUT_USER").ok();