mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-09 05:28:31 -04:00
Update dependencies; remove usage of flatten()
This commit is contained in:
parent
292cdecd87
commit
b79a6af150
4 changed files with 84 additions and 91 deletions
|
@ -9,8 +9,7 @@ async 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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue