From d4096cf2a4263258bea25278598e6d955a467741 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Mon, 2 Sep 2019 17:25:13 -0700 Subject: [PATCH] Make more modules private and opt to expose some types/traits directly --- src/error.rs | 6 ++---- src/lib.rs | 9 +++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/error.rs b/src/error.rs index fb6ce3d2..05497790 100644 --- a/src/error.rs +++ b/src/error.rs @@ -44,7 +44,7 @@ impl StdError for Error { match self { Error::Io(error) => Some(error), - _ => None + _ => None, } } } @@ -62,9 +62,7 @@ impl Display for Error { f.write_str("found more than one row when we expected exactly one") } - Error::__Nonexhaustive => { - unreachable!() - } + Error::__Nonexhaustive => unreachable!(), } } } diff --git a/src/lib.rs b/src/lib.rs index ea8bca51..b1cf132d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,12 +11,12 @@ mod macros; #[macro_use] mod io; -pub mod backend; +mod backend; pub mod deserialize; mod url; #[macro_use] -pub mod row; +mod row; mod connection; pub mod error; @@ -32,11 +32,16 @@ pub mod types; #[doc(inline)] pub use self::{ + backend::Backend, connection::Connection, + deserialize::FromSql, error::{Error, Result}, executor::Executor, pool::Pool, + row::{FromSqlRow, Row}, + serialize::ToSql, sql::{query, SqlQuery}, + types::HasSqlType, }; #[cfg(feature = "mariadb")]