Skip to content

Commit

Permalink
chore(backend): remove as many usages of crate:: as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Dec 12, 2024
1 parent 2a1f439 commit 52cb158
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;

use crate::m20231017_create_user_to_entity::CONSTRAINT_SQL;
use super::m20231017_create_user_to_entity::CONSTRAINT_SQL;

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;

use crate::{
use super::{
m20231016_create_collection_to_entity::{CONSTRAINT_SQL, ENTITY_ID_SQL, ENTITY_LOT_SQL},
m20240904_create_monitored_entity::MONITORED_ENTITY_VIEW_CREATION_SQL,
};
Expand Down
2 changes: 1 addition & 1 deletion crates/migrations/src/m20241019_changes_for_issue_929.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;

use crate::m20240904_create_monitored_entity::MONITORED_ENTITY_VIEW_CREATION_SQL;
use super::m20240904_create_monitored_entity::MONITORED_ENTITY_VIEW_CREATION_SQL;

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand Down
2 changes: 1 addition & 1 deletion crates/migrations/src/m20241126_changes_for_issue_1113.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use sea_orm_migration::prelude::*;

use crate::{
use super::{
m20230822_create_exercise::EXERCISE_NAME_INDEX,
m20240827_create_daily_user_activity::create_daily_user_activity_table,
};
Expand Down
2 changes: 1 addition & 1 deletion crates/models/database/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use sea_orm::{
ActiveModelTrait, ActiveValue, ColumnTrait, ConnectionTrait, EntityTrait, QueryFilter,
};

use crate::{prelude::UserToEntity, user_to_entity};
use super::{prelude::UserToEntity, user_to_entity};

pub async fn get_user_to_entity_association<C>(
db: &C,
Expand Down
2 changes: 1 addition & 1 deletion crates/models/database/src/review.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rust_decimal::Decimal;
use sea_orm::{entity::prelude::*, ActiveValue};
use serde::{Deserialize, Serialize};

use crate::functions::associate_user_with_entity;
use super::functions::associate_user_with_entity;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[sea_orm(table_name = "review")]
Expand Down
2 changes: 1 addition & 1 deletion crates/models/database/src/seen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use rust_decimal_macros::dec;
use sea_orm::{entity::prelude::*, ActiveValue};
use serde::{Deserialize, Serialize};

use crate::functions::associate_user_with_entity;
use super::functions::associate_user_with_entity;

#[derive(Clone, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize, SimpleObject, Educe)]
#[graphql(name = "Seen")]
Expand Down
4 changes: 1 addition & 3 deletions crates/services/importer/src/audiobookshelf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ use reqwest::{
use serde_json::json;
use specific_models::audiobookshelf as audiobookshelf_models;

use crate::utils;

use super::{ImportFailStep, ImportFailedItem};
use super::{utils, ImportFailStep, ImportFailedItem};

pub async fn import<F>(
input: DeployUrlAndKeyImportInput,
Expand Down
4 changes: 1 addition & 3 deletions crates/services/importer/src/goodreads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ use rust_decimal::Decimal;
use rust_decimal_macros::dec;
use serde::Deserialize;

use crate::utils;

use super::{ImportFailStep, ImportFailedItem};
use super::{utils, ImportFailStep, ImportFailedItem};

#[derive(Debug, Deserialize)]
struct Book {
Expand Down
2 changes: 1 addition & 1 deletion crates/services/importer/src/hevy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use rust_decimal_macros::dec;
use serde::{Deserialize, Serialize};
use supporting_service::SupportingService;

use crate::utils;
use super::utils;

#[derive(Debug, Serialize, Deserialize, Clone, Default)]
struct Entry {
Expand Down
4 changes: 1 addition & 3 deletions crates/services/importer/src/storygraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ use rust_decimal::Decimal;
use rust_decimal_macros::dec;
use serde::{Deserialize, Serialize};

use crate::utils;

use super::{ImportFailStep, ImportFailedItem, ImportOrExportMetadataItem};
use super::{utils, ImportFailStep, ImportFailedItem, ImportOrExportMetadataItem};

#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
Expand Down

0 comments on commit 52cb158

Please sign in to comment.