From ceb9f11de866926da8097e840f7a99feb451dc32 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 16 May 2020 10:18:25 +0200 Subject: [PATCH] Replace pub(crate) by pub(super) visibilty --- src/column.rs | 2 +- src/context.rs | 2 +- src/statement.rs | 8 ++++---- src/vtab/mod.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/column.rs b/src/column.rs index 36ba9c8..cb6578b 100644 --- a/src/column.rs +++ b/src/column.rs @@ -39,7 +39,7 @@ impl Statement<'_> { self.stmt.column_count() } - pub(crate) fn column_name_unwrap(&self, col: usize) -> &str { + pub(super) fn column_name_unwrap(&self, col: usize) -> &str { // Just panic if the bounds are wrong for now, we never call this // without checking first. self.column_name(col).expect("Column out of bounds") diff --git a/src/context.rs b/src/context.rs index ad0a3ad..b7e8bc8 100644 --- a/src/context.rs +++ b/src/context.rs @@ -12,7 +12,7 @@ use crate::types::{ToSqlOutput, ValueRef}; #[cfg(feature = "array")] use crate::vtab::array::{free_array, ARRAY_TYPE}; -pub(crate) unsafe fn set_result(ctx: *mut sqlite3_context, result: &ToSqlOutput<'_>) { +pub(super) unsafe fn set_result(ctx: *mut sqlite3_context, result: &ToSqlOutput<'_>) { let value = match *result { ToSqlOutput::Borrowed(v) => v, ToSqlOutput::Owned(ref v) => ValueRef::from(v), diff --git a/src/statement.rs b/src/statement.rs index cd05ef6..ed5dc96 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -731,11 +731,11 @@ impl Drop for Statement<'_> { } impl Statement<'_> { - pub(crate) fn new(conn: &Connection, stmt: RawStatement) -> Statement<'_> { + pub(super) fn new(conn: &Connection, stmt: RawStatement) -> Statement<'_> { Statement { conn, stmt } } - pub(crate) fn value_ref(&self, col: usize) -> ValueRef<'_> { + pub(super) fn value_ref(&self, col: usize) -> ValueRef<'_> { let raw = unsafe { self.stmt.ptr() }; match self.stmt.column_type(col) { @@ -791,7 +791,7 @@ impl Statement<'_> { } } - pub(crate) fn step(&self) -> Result { + pub(super) fn step(&self) -> Result { match self.stmt.step() { ffi::SQLITE_ROW => Ok(true), ffi::SQLITE_DONE => Ok(false), @@ -799,7 +799,7 @@ impl Statement<'_> { } } - pub(crate) fn reset(&self) -> c_int { + pub(super) fn reset(&self) -> c_int { self.stmt.reset() } } diff --git a/src/vtab/mod.rs b/src/vtab/mod.rs index 5b47c65..d10dbed 100644 --- a/src/vtab/mod.rs +++ b/src/vtab/mod.rs @@ -542,7 +542,7 @@ impl Values<'_> { // `sqlite3_value_type` returns `SQLITE_NULL` for pointer. // So it seems not possible to enhance `ValueRef::from_value`. #[cfg(feature = "array")] - pub(crate) fn get_array(&self, idx: usize) -> Result> { + fn get_array(&self, idx: usize) -> Result> { use crate::types::Value; let arg = self.args[idx]; let ptr = unsafe { ffi::sqlite3_value_pointer(arg, array::ARRAY_TYPE) };