From 06164a553851f7fbc8a671142751874413b0a128 Mon Sep 17 00:00:00 2001 From: Michael Freeborn Date: Sat, 30 Apr 2022 11:25:45 +0100 Subject: [PATCH] make methods pub --- 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 8357039616..591dd1ec15 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()?)?) } }