From 1498caf2f050b0a509689ab6e65a0daac062c76e Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 10 Dec 2018 22:20:37 -0800 Subject: Make hidden lifetime parameters explicit With a recent Rust version upgrade hidden lifetime parameters cause a warning of the form: > warning: hidden lifetime parameters in types are deprecated > --> src/error.rs:58:25 > | > 58 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { > | ^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>` This change adjusts the code to make those lifetimes explicit (while keeping them anonymous). --- nitrocli/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nitrocli/src/error.rs b/nitrocli/src/error.rs index 81d7de9..3d68401 100644 --- a/nitrocli/src/error.rs +++ b/nitrocli/src/error.rs @@ -53,7 +53,7 @@ impl From for Error { impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { Error::HidError(ref e) => write!(f, "hidapi error: {}", e), Error::Utf8Error(_) => write!(f, "Encountered UTF-8 conversion error"), -- cgit v1.2.3