diff --git a/quaint/src/connector.rs b/quaint/src/connector.rs index 7903d23931c0..a2ee455fee22 100644 --- a/quaint/src/connector.rs +++ b/quaint/src/connector.rs @@ -38,10 +38,10 @@ pub use postgres::wasm::common::*; #[cfg(feature = "mysql")] pub(crate) mod mysql; +#[cfg(feature = "mysql")] +pub use mysql::*; #[cfg(feature = "mysql-native")] pub use mysql::native::*; -#[cfg(feature = "mysql")] -pub use mysql::wasm::common::*; #[cfg(feature = "sqlite")] pub(crate) mod sqlite; diff --git a/quaint/src/connector/mysql.rs b/quaint/src/connector/mysql.rs index 1e52af6a83a0..0834be88949e 100644 --- a/quaint/src/connector/mysql.rs +++ b/quaint/src/connector/mysql.rs @@ -1,8 +1,11 @@ -pub use wasm::common::MysqlUrl; -pub use wasm::error::MysqlError; +//! Wasm-compatible definitions for the MySQL connector. +//! This module is only available with the `mysql` feature. +pub mod error; +pub(crate) mod url; -#[cfg(feature = "mysql")] -pub(crate) mod wasm; +pub use error::MysqlError; +pub use url::MysqlUrl; #[cfg(feature = "mysql-native")] pub(crate) mod native; + diff --git a/quaint/src/connector/mysql/wasm/error.rs b/quaint/src/connector/mysql/error.rs similarity index 100% rename from quaint/src/connector/mysql/wasm/error.rs rename to quaint/src/connector/mysql/error.rs diff --git a/quaint/src/connector/mysql/native/error.rs b/quaint/src/connector/mysql/native/error.rs index e00ff1e0aa74..89c21fb706f6 100644 --- a/quaint/src/connector/mysql/native/error.rs +++ b/quaint/src/connector/mysql/native/error.rs @@ -1,5 +1,5 @@ use crate::{ - connector::mysql::wasm::error::MysqlError, + connector::mysql::error::MysqlError, error::{Error, ErrorKind}, }; use mysql_async as my; diff --git a/quaint/src/connector/mysql/native/mod.rs b/quaint/src/connector/mysql/native/mod.rs index e72a2c47a9a1..7a95ee47b614 100644 --- a/quaint/src/connector/mysql/native/mod.rs +++ b/quaint/src/connector/mysql/native/mod.rs @@ -4,7 +4,7 @@ mod conversion; mod error; -pub(crate) use crate::connector::mysql::wasm::common::MysqlUrl; +pub(crate) use crate::connector::mysql::MysqlUrl; use crate::connector::{timeout, IsolationLevel}; use crate::{ diff --git a/quaint/src/connector/mysql/wasm/common.rs b/quaint/src/connector/mysql/url.rs similarity index 100% rename from quaint/src/connector/mysql/wasm/common.rs rename to quaint/src/connector/mysql/url.rs diff --git a/quaint/src/connector/mysql/wasm/mod.rs b/quaint/src/connector/mysql/wasm/mod.rs deleted file mode 100644 index 4f73f82031d5..000000000000 --- a/quaint/src/connector/mysql/wasm/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! Wasm-compatible definitions for the MySQL connector. -//! This module is only available with the `mysql` feature. -pub(crate) mod common; -pub mod error; - -pub use common::MysqlUrl;