From a110e75b956db539c0605c4cabed2aceafa9ecb1 Mon Sep 17 00:00:00 2001 From: Michael Freeborn <31806808+mfreeborn@users.noreply.github.com> Date: Wed, 1 Jun 2022 00:57:46 +0100 Subject: [PATCH] make methods pub (#1843) --- sqlx-core/src/postgres/value.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlx-core/src/postgres/value.rs b/sqlx-core/src/postgres/value.rs index 83570396..591dd1ec 100644 --- a/sqlx-core/src/postgres/value.rs +++ b/sqlx-core/src/postgres/value.rs @@ -50,18 +50,18 @@ impl<'r> PgValueRef<'r> { } } - pub(crate) fn format(&self) -> PgValueFormat { + pub fn format(&self) -> PgValueFormat { self.format } - pub(crate) fn as_bytes(&self) -> Result<&'r [u8], BoxDynError> { + pub fn as_bytes(&self) -> Result<&'r [u8], BoxDynError> { match &self.value { Some(v) => Ok(v), None => Err(UnexpectedNullError.into()), } } - pub(crate) fn as_str(&self) -> Result<&'r str, BoxDynError> { + pub fn as_str(&self) -> Result<&'r str, BoxDynError> { Ok(from_utf8(self.as_bytes()?)?) } }