From dbb9b32a1f533a75a99a0426ae5f30e3eddf3c2b Mon Sep 17 00:00:00 2001 From: Addy Bryant Date: Sun, 6 Mar 2022 14:07:29 -0500 Subject: [PATCH 1/3] fix: fixed error that was allowed in Rust 2015 edition --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3b6287c..3fe8da2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,7 +64,7 @@ impl error::Error for Void { unreachable(*self) } - fn cause(&self) -> Option<&error::Error> { + fn cause(&self) -> Option<&dyn error::Error> { unreachable(*self) } } From 6a9f53750985f7407ae108e37088c2f2c40fd048 Mon Sep 17 00:00:00 2001 From: Addy Bryant Date: Sun, 6 Mar 2022 14:08:42 -0500 Subject: [PATCH 2/3] misc: cargo fmt --- src/lib.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3fe8da2..8b5cbaa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,19 +14,19 @@ #[cfg(not(feature = "std"))] mod coreprovider { extern crate core; - pub use core::{fmt, cmp}; + pub use core::{cmp, fmt}; } #[cfg(feature = "std")] mod coreprovider { - pub use std::{fmt, cmp, error}; + pub use std::{cmp, error, fmt}; } use coreprovider::*; /// The empty type for cases which can't occur. #[derive(Copy)] -pub enum Void { } +pub enum Void {} impl Clone for Void { fn clone(&self) -> Void { @@ -95,7 +95,7 @@ impl ResultVoidExt for Result { fn void_unwrap(self) -> T { match self { Ok(val) => val, - Err(e) => unreachable(e) + Err(e) => unreachable(e), } } } @@ -114,8 +114,7 @@ impl ResultVoidErrExt for Result { fn void_unwrap_err(self) -> E { match self { Ok(v) => unreachable(v), - Err(e) => e + Err(e) => e, } } } - From 0146b0c20befbdf2123309fb9058ca9a03aa597c Mon Sep 17 00:00:00 2001 From: Addy Bryant Date: Sun, 6 Mar 2022 14:39:22 -0500 Subject: [PATCH 3/3] bump version number --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 226f4df..96829af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "void" -version = "1.0.2" +version = "1.0.3" authors = ["Jonathan Reem "] repository = "https://github.com/reem/rust-void.git" description = "The uninhabited void type for use in statically impossible cases."