From c6b037e2a35b0c21263c9be799ab79babf3c181d Mon Sep 17 00:00:00 2001 From: Travis Finkenauer Date: Thu, 21 Apr 2022 00:28:15 -0700 Subject: [PATCH] Suppress unreachable_code lint Beforehand, this has the opposite of the desired behavior. Instead of causing a warning on *unsupported* platforms, this only emits an error on *supported* platforms. As of writing, there is no `compiler_warning!` macro like there is `compile_error!` in std. Resolves #103. --- lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.rs b/lib.rs index 7640281..b307fd3 100644 --- a/lib.rs +++ b/lib.rs @@ -853,7 +853,7 @@ pub fn boottime() -> Result { return Ok(bt); } - #[warn(unreachable_code)] + #[allow(unreachable_code)] Err(Error::UnsupportedSystem) }