diff options
author | Daniel Mueller <deso@posteo.net> | 2018-12-10 22:20:37 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2018-12-10 22:20:37 -0800 |
commit | 1498caf2f050b0a509689ab6e65a0daac062c76e (patch) | |
tree | 75fe6f5c3c72583ca0b37984dfb43b95eee15ce3 | |
parent | 54af5b5489a3a86e864a11836cff48af15da1f98 (diff) | |
download | nitrocli-1498caf2f050b0a509689ab6e65a0daac062c76e.tar.gz nitrocli-1498caf2f050b0a509689ab6e65a0daac062c76e.tar.bz2 |
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).
-rw-r--r-- | nitrocli/src/error.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<string::FromUtf8Error> 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"), |