diff options
| -rw-r--r-- | nitrocli/src/error.rs | 1 | ||||
| -rw-r--r-- | nitrocli/src/main.rs | 5 | ||||
| -rw-r--r-- | nitrocli/src/nitrokey.rs | 3 | ||||
| -rw-r--r-- | nitrocli/src/pinentry.rs | 3 | 
4 files changed, 7 insertions, 5 deletions
| diff --git a/nitrocli/src/error.rs b/nitrocli/src/error.rs index ea9a189..81d7de9 100644 --- a/nitrocli/src/error.rs +++ b/nitrocli/src/error.rs @@ -17,7 +17,6 @@  // * along with this program.  If not, see <http://www.gnu.org/licenses/>. *  // ************************************************************************* -use libhid;  use std::fmt;  use std::io;  use std::string; diff --git a/nitrocli/src/main.rs b/nitrocli/src/main.rs index ebc0589..67a0a22 100644 --- a/nitrocli/src/main.rs +++ b/nitrocli/src/main.rs @@ -17,8 +17,8 @@  // * along with this program.  If not, see <http://www.gnu.org/licenses/>. *  // ************************************************************************* -  #![deny(missing_docs)] +#![warn(rust_2018_compatibility)]  //! Nitrocli is a program providing a command line interface to certain  //! commands of the Nitrokey Storage device. @@ -31,13 +31,14 @@ mod error;  mod nitrokey;  mod pinentry; -use error::Error;  use std::mem;  use std::process;  use std::result;  use std::thread;  use std::time; +use crate::error::Error; +  type Result<T> = result::Result<T, Error>;  type NitroFunc = Fn(&mut libhid::Handle) -> Result<()>; diff --git a/nitrocli/src/nitrokey.rs b/nitrocli/src/nitrokey.rs index 83f5d1f..64685e2 100644 --- a/nitrocli/src/nitrokey.rs +++ b/nitrocli/src/nitrokey.rs @@ -17,10 +17,11 @@  // * along with this program.  If not, see <http://www.gnu.org/licenses/>. *  // ************************************************************************* -use crc32::crc;  use std::cmp;  use std::mem; +use crate::crc32::crc; +  // The Nitrokey Storage vendor ID.  pub const VID: u16 = 0x20A0; diff --git a/nitrocli/src/pinentry.rs b/nitrocli/src/pinentry.rs index 7bf1db9..b4695ec 100644 --- a/nitrocli/src/pinentry.rs +++ b/nitrocli/src/pinentry.rs @@ -17,9 +17,10 @@  // * along with this program.  If not, see <http://www.gnu.org/licenses/>. *  // ************************************************************************* -use error::Error;  use std::process; +use crate::error::Error; +  /// PIN type requested from pinentry.  /// | 
