From 716294715bc505d2d0dd8c9ebd55255a358fc052 Mon Sep 17 00:00:00 2001 From: Islam El-Ashi Date: Thu, 21 Sep 2023 11:11:28 +0300 Subject: [PATCH] feat: expose helper methods for extracting bounds --- src/storable.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storable.rs b/src/storable.rs index 12459e3b..edbd3f12 100644 --- a/src/storable.rs +++ b/src/storable.rs @@ -472,7 +472,7 @@ pub(crate) const fn bounds() -> Bounds { } /// Returns the max size of the given type if bounded, panics if unbounded. -pub(crate) const fn max_size() -> u32 { +pub const fn max_size() -> u32 { if let Bound::Bounded { max_size, .. } = A::BOUND { max_size } else { @@ -481,7 +481,7 @@ pub(crate) const fn max_size() -> u32 { } /// Returns true if the type is fixed in size, false otherwise. -pub(crate) const fn is_fixed_size() -> bool { +pub const fn is_fixed_size() -> bool { if let Bound::Bounded { is_fixed_size, .. } = A::BOUND { is_fixed_size } else {