Skip to content

Commit

Permalink
chore: replace awkward "super::super::" with "crate::..."
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomyno committed Nov 15, 2023
1 parent 2ffe394 commit 76816fd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::connection::SqlConnection;
use crate::database::{catch, connection::SqlConnection};
use crate::{FromSource, SqlError};
use async_trait::async_trait;
use connector_interface::{
Expand Down Expand Up @@ -60,7 +60,7 @@ impl FromSource for Mssql {
#[async_trait]
impl Connector for Mssql {
async fn get_connection<'a>(&'a self) -> connector::Result<Box<dyn Connection + Send + Sync + 'static>> {
super::super::catch(self.connection_info.clone(), async move {
catch(self.connection_info.clone(), async move {
let conn = self.pool.check_out().await.map_err(SqlError::from)?;
let conn = SqlConnection::new(conn, &self.connection_info, self.features);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::connection::SqlConnection;
use crate::database::{catch, connection::SqlConnection};
use crate::{FromSource, SqlError};
use async_trait::async_trait;
use connector_interface::{
Expand Down Expand Up @@ -65,7 +65,7 @@ impl FromSource for Mysql {
#[async_trait]
impl Connector for Mysql {
async fn get_connection<'a>(&'a self) -> connector::Result<Box<dyn Connection + Send + Sync + 'static>> {
super::super::catch(self.connection_info.clone(), async move {
catch(self.connection_info.clone(), async move {
let runtime_conn = self.pool.check_out().await?;

// Note: `runtime_conn` must be `Sized`, as that's required by `TransactionCapable`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::connection::SqlConnection;
use crate::database::{catch, connection::SqlConnection};
use crate::{FromSource, SqlError};
use async_trait::async_trait;
use connector_interface::{
Expand Down Expand Up @@ -67,7 +67,7 @@ impl FromSource for PostgreSql {
#[async_trait]
impl Connector for PostgreSql {
async fn get_connection<'a>(&'a self) -> connector_interface::Result<Box<dyn Connection + Send + Sync + 'static>> {
super::super::catch(self.connection_info.clone(), async move {
catch(self.connection_info.clone(), async move {
let conn = self.pool.check_out().await.map_err(SqlError::from)?;
let conn = SqlConnection::new(conn, &self.connection_info, self.features);
Ok(Box::new(conn) as Box<dyn Connection + Send + Sync + 'static>)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::connection::SqlConnection;
use crate::database::{catch, connection::SqlConnection};
use crate::{FromSource, SqlError};
use async_trait::async_trait;
use connector_interface::{
Expand Down Expand Up @@ -80,7 +80,7 @@ fn invalid_file_path_error(file_path: &str, connection_info: &ConnectionInfo) ->
#[async_trait]
impl Connector for Sqlite {
async fn get_connection<'a>(&'a self) -> connector::Result<Box<dyn Connection + Send + Sync + 'static>> {
super::super::catch(self.connection_info().clone(), async move {
catch(self.connection_info().clone(), async move {
let conn = self.pool.check_out().await.map_err(SqlError::from)?;
let conn = SqlConnection::new(conn, self.connection_info(), self.features);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl SqlSchemaCalculatorFlavour for MssqlFlavour {
}
}

fn push_connector_data(&self, context: &mut super::super::Context<'_>) {
fn push_connector_data(&self, context: &mut crate::sql_schema_calculator::Context<'_>) {
let mut data = MssqlSchemaExt::default();

for model in context.datamodel.db.walk_models() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl SqlSchemaCalculatorFlavour for PostgresFlavour {
}
}

fn push_connector_data(&self, context: &mut super::super::Context<'_>) {
fn push_connector_data(&self, context: &mut crate::sql_schema_calculator::Context<'_>) {
let mut postgres_ext = PostgresSchemaExt::default();
let db = &context.datamodel.db;

Expand Down

0 comments on commit 76816fd

Please sign in to comment.