aboutsummaryrefslogtreecommitdiff
path: root/nitrocli/src/main.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-10 22:11:41 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-10 22:11:41 -0800
commit0b18dd976269b09d3d44208eaab0000ddfebaf93 (patch)
treea72b23a25af51c1fbd8300ec68cd3f093ac731f7 /nitrocli/src/main.rs
parent7fd034561b13bac5ab02d8ba23c40be1a70b5a9c (diff)
downloadnitrocli-0b18dd976269b09d3d44208eaab0000ddfebaf93.tar.gz
nitrocli-0b18dd976269b09d3d44208eaab0000ddfebaf93.tar.bz2
Enable rust_2018_compatibility lint
In preparation for the switch to using Rust 2018, this change enables the rust_2018_compatibility lint. Along with that enablement we fix the warnings emitted by it, which evolve around the module system changes Rust has gone through and that require us to prefix initial uses of crate local modules with "crate".
Diffstat (limited to 'nitrocli/src/main.rs')
-rw-r--r--nitrocli/src/main.rs5
1 files changed, 3 insertions, 2 deletions
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<()>;