fix: readme, missing dotenv, lint

This commit is contained in:
Aram 🍐 2020-11-17 23:47:04 -05:00
parent 7988d6adcb
commit ddb003dc0c
3 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "nut-client"
version = "0.0.1"
version = "0.0.2"
authors = ["Aram Peres <aram.peres@wavy.fm>"]
edition = "2018"
description = "Network UPS Tools (NUT) client library"
@ -15,3 +15,7 @@ license = "MIT"
[dependencies]
shell-words = "1.0.0"
dotenv = { version = "0.15.0", optional = true }
[features]
env-file = ["dotenv"]

View file

@ -3,7 +3,7 @@
[![crates.io](https://img.shields.io/crates/v/nut-client.svg)](https://crates.io/crates/nut-client)
[![Documentation](https://docs.rs/nut-client/badge.svg)](https://docs.rs/nut-client)
[![MIT licensed](https://img.shields.io/crates/l/nut-client.svg)](./LICENSE)
[![CI](https://github.com/aramperes/nut-client-rs/workflows/CI/badge.svg)](https://github.com/aramperes/nut-client-rs/actions?query=workflow%3ACI)
[![CI](https://github.com/aramperes/nut-client-rs/workflows/CI/badge.svg)](https://github.com/aramperes/nut-client/actions?query=workflow%3ACI)
A [Network UPS Tools](https://github.com/networkupstools/nut) (NUT) client library for Rust.

View file

@ -1,8 +1,8 @@
use std::env;
use std::net::ToSocketAddrs;
use nut_client::{Auth, ConfigBuilder, Host};
use nut_client::blocking::Connection;
use nut_client::{Auth, ConfigBuilder, Host};
fn main() -> nut_client::Result<()> {
let addr = env::var("NUT_ADDR")