From 3396f9657c6d9b1d8a83b402d631e874508ab1d7 Mon Sep 17 00:00:00 2001 From: Al Liu Date: Tue, 18 Jun 2024 22:41:27 +0800 Subject: [PATCH] impl `Trailer` for () --- Cargo.toml | 2 +- src/lib.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 98b98c8e..3e179469 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "skl" -version = "0.11.0" +version = "0.11.1" edition = "2021" rust-version = "1.56.0" repository = "https://github.com/al8n/skl" diff --git a/src/lib.rs b/src/lib.rs index c27bdd6e..bfd82d8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -154,6 +154,14 @@ unsafe impl Trailer for u64 { } } +unsafe impl Trailer for () { + /// Returns the version of the trailer. + #[inline] + fn version(&self) -> u64 { + 0 + } +} + mod sync { #[cfg(not(feature = "loom"))] pub(crate) use core::sync::atomic::*;