mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-09 13:38:30 -04:00
parent
c56be76906
commit
11f70642dd
6 changed files with 34 additions and 8 deletions
|
@ -43,5 +43,6 @@ async fn main() -> nut_client::Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
// Gracefully shut down the connection using the `LOGOUT` command
|
||||
conn.close().await
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::convert::TryInto;
|
||||
use std::env;
|
||||
|
||||
use nut_client::blocking::Connection;
|
||||
use nut_client::{Auth, ConfigBuilder};
|
||||
use std::convert::TryInto;
|
||||
|
||||
fn main() -> nut_client::Result<()> {
|
||||
let host = env::var("NUT_HOST").unwrap_or_else(|_| "localhost".into());
|
||||
|
@ -42,5 +42,6 @@ fn main() -> nut_client::Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
// Gracefully shut down the connection using the `LOGOUT` command
|
||||
conn.close()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue