Skip to content

build(deps): bump sea-orm from 0.12.15 to 1.0.1 #642

build(deps): bump sea-orm from 0.12.15 to 1.0.1

build(deps): bump sea-orm from 0.12.15 to 1.0.1 #642

Triggered via pull request September 13, 2024 08:01
Status Failure
Total duration 57s
Artifacts

test.yml

on: pull_request
Matrix: required
Fit to window
Zoom out
Zoom in

Annotations

374 errors
mismatched types: challenges/src/main.rs#L107
error[E0308]: mismatched types --> challenges/src/main.rs:107:44 | 107 | .with(DbTransactionMiddleware::new(db)) | ---------------------------- ^^ expected `DatabaseConnection`, found `sea_orm::DatabaseConnection` | | | arguments to this function are incorrect | = note: `sea_orm::DatabaseConnection` and `DatabaseConnection` have similar names, but are actually distinct types note: `sea_orm::DatabaseConnection` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/db_connection.rs:20:1 | 20 | pub enum DatabaseConnection { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `DatabaseConnection` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/db_connection.rs:19:1 | 19 | pub enum DatabaseConnection { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used? note: associated function defined here --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/db.rs:65:12 | 65 | pub fn new(db: DatabaseConnection) -> Self { | ^^^
mismatched types: challenges/src/services/subtasks.rs#L666
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:666:18 | 666 | retired: data.retired.update(subtask.retired), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L665
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:665:18 | 665 | enabled: data.enabled.update(subtask.enabled), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L664
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:664:16 | 664 | coins: data.coins.map(|x| x as _).update(subtask.coins), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L663
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:663:13 | 663 | xp: data.xp.map(|x| x as _).update(subtask.xp), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L659
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:659:18 | 659 | task_id: data.task_id.update(subtask.task_id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<uuid::Uuid>`, found `ActiveValue<Uuid>` | = note: `ActiveValue<Uuid>` and `sea_orm::ActiveValue<uuid::Uuid>` have similar names, but are actually distinct types note: `ActiveValue<Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<uuid::Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied: challenges/src/services/subtasks.rs#L659
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied --> challenges/src/services/subtasks.rs:659:31 | 659 | task_id: data.task_id.update(subtask.task_id), | ^^^^^^ the trait `std::convert::From<uuid::Uuid>` is not implemented for `sea_query::value::Value`, which is required by `uuid::Uuid: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `uuid::Uuid` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L164
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:164:27 | 164 | report.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L158
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:158:32 | 158 | subtask.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L150
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:150:21 | 149 | ban_user( | -------- arguments to this function are incorrect 150 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:240:10 | 240 | async fn ban_user( | ^^^^^^^^ 241 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L144
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:144:25 | 144 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L132
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:132:21 | 131 | ban_user( | -------- arguments to this function are incorrect 132 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:240:10 | 240 | async fn ban_user( | ^^^^^^^^ 241 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L120
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:120:18 | 120 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L117
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:117:13 | 117 | / challenges_subtask_reports::Entity::find_by_id(report_id.0) 118 | | .find_also_related(challenges_subtasks::Entity) 119 | | .one(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L95
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:95:13 | 94 | let (report, _) = create_report( | ------------- arguments to this function are incorrect 95 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:194:21 | 194 | pub(super) async fn create_report( | ^^^^^^^^^^^^^ 195 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L88
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:88:30 | 88 | match get_active_ban(&db, &auth.0, ChallengesBanAction::Report).await? { | -------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:166:14 | 166 | pub async fn get_active_ban( | ^^^^^^^^^^^^^^ 167 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L83
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:83:45 | 83 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L76
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:76:46 | 76 | let Some((subtask, _)) = get_subtask(&db, data.0.task_id, data.0.subtask_id).await? else { | ----------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/mod.rs:163:10 | 163 | async fn get_subtask( | ^^^^^^^^^^^ 164 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L61
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:61:18 | 61 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L59
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:59:13 | 59 | / query 60 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L60
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:60:22 | 60 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L100
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:100:21 | 99 | create_report( | ------------- arguments to this function are incorrect 100 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:194:21 | 194 | pub(super) async fn create_report( | ^^^^^^^^^^^^^ 195 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/feedback.rs#L89
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/feedback.rs:89:18 | 89 | .await?; | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/feedback.rs#L85
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/feedback.rs:85:27 | 85 | let ratings = challenges_user_subtasks::Entity::find() | ___________________________^ 86 | | .filter(challenges_user_subtasks::Column::UserId.eq(subtask.id)) 87 | | .filter(challenges_user_subtasks::Column::Rating.is_not_null()) 88 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/feedback.rs#L88
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/feedback.rs:88:22 | 88 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L55
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:55:13 | 54 | update_user_subtask( | ------------------- arguments to this function are incorrect 55 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L49
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:49:45 | 49 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L42
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:42:46 | 42 | let Some((subtask, _)) = get_subtask(&db, task_id.0, subtask_id.0).await? else { | ----------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/mod.rs:163:10 | 163 | async fn get_subtask( | ^^^^^^^^^^^ 164 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L157
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:157:20 | 157 | ban.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L153
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:153:33 | 153 | let Some(ban) = get_ban(&db, ban_id.0).await? else { | ------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/bans.rs:188:10 | 188 | async fn get_ban( | ^^^^^^^ 189 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L139
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:139:21 | 139 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L137
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:137:25 | 137 | reason: data.reason.update(ban.reason), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L136
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:136:25 | 136 | action: data.action.update(ban.action), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<ChallengesBanAction>`, found a different `ActiveValue<ChallengesBanAction>` | = note: `ActiveValue<ChallengesBanAction>` and `ActiveValue<ChallengesBanAction>` have similar names, but are actually distinct types note: `ActiveValue<ChallengesBanAction>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<ChallengesBanAction>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<entity::sea_orm_active_enums::ChallengesBanAction>` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L136
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<entity::sea_orm_active_enums::ChallengesBanAction>` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:136:37 | 136 | action: data.action.update(ban.action), | ^^^^^^ the trait `std::convert::From<entity::sea_orm_active_enums::ChallengesBanAction>` is not implemented for `sea_query::value::Value`, which is required by `entity::sea_orm_active_enums::ChallengesBanAction: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `entity::sea_orm_active_enums::ChallengesBanAction` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L135
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:135:22 | 135 | end: data.end.map(|x| x.map(|ts| ts.naive_utc())).update(ban.end), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Option<NaiveDateTime>>`, found a different `ActiveValue<Option<NaiveDateTime>>` | = note: `ActiveValue<Option<NaiveDateTime>>` and `ActiveValue<Option<NaiveDateTime>>` have similar names, but are actually distinct types note: `ActiveValue<Option<NaiveDateTime>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Option<NaiveDateTime>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L135
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:135:67 | 135 | end: data.end.map(|x| x.map(|ts| ts.naive_utc())).update(ban.end), | ^^^^^^ the trait `std::convert::From<chrono::NaiveDateTime>` is not implemented for `sea_query::value::Value`, which is required by `std::option::Option<chrono::NaiveDateTime>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `chrono::NaiveDateTime` to implement `std::convert::Into<sea_query::value::Value>` = note: required for `sea_query::value::Value` to implement `std::convert::From<std::option::Option<chrono::NaiveDateTime>>` = note: 1 redundant requirement hidden = note: required for `std::option::Option<chrono::NaiveDateTime>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
the trait bound `chrono::NaiveDateTime: sea_query::value::Nullable` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L135
error[E0277]: the trait bound `chrono::NaiveDateTime: sea_query::value::Nullable` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:135:67 | 135 | end: data.end.map(|x| x.map(|ts| ts.naive_utc())).update(ban.end), | ^^^^^^ the trait `sea_query::value::Nullable` is not implemented for `chrono::NaiveDateTime`, which is required by `std::option::Option<chrono::NaiveDateTime>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `sea_query::value::Nullable`: &str bool char f32 f64 i16 i32 i64 and 7 others = note: required for `sea_query::value::Value` to implement `std::convert::From<std::option::Option<chrono::NaiveDateTime>>` = note: required for `std::option::Option<chrono::NaiveDateTime>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L134
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:134:24 | 134 | start: data.start.map(|ts| ts.naive_utc()).update(ban.start), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<NaiveDateTime>`, found a different `ActiveValue<NaiveDateTime>` | = note: `ActiveValue<NaiveDateTime>` and `ActiveValue<NaiveDateTime>` have similar names, but are actually distinct types note: `ActiveValue<NaiveDateTime>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<NaiveDateTime>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L134
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:134:60 | 134 | start: data.start.map(|ts| ts.naive_utc()).update(ban.start), | ^^^^^^ the trait `std::convert::From<chrono::NaiveDateTime>` is not implemented for `sea_query::value::Value`, which is required by `chrono::NaiveDateTime: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `chrono::NaiveDateTime` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L114
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:114:33 | 114 | let Some(ban) = get_ban(&db, ban_id.0).await? else { | ------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/bans.rs:188:10 | 188 | async fn get_ban( | ^^^^^^^ 189 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L99
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:99:21 | 99 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L69
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:69:18 | 69 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L67
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:67:13 | 67 | / query 68 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L68
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:68:22 | 68 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L142
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:142:24 | 142 | subtask.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L133
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:133:14 | 133 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L130
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:130:29 | 130 | let Some(subtask) = challenges_subtasks::Entity::find_by_id(subtask_id.0) | _____________________________^ 131 | | .filter(challenges_subtasks::Column::TaskId.eq(task_id.0)) 132 | | .one(&***db) | |________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L132
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:132:18 | 132 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
mismatched types: challenges/src/endpoints/subtasks/mod.rs#L115
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/mod.rs:115:35 | 115 | stat_subtasks_prepare(&db, &auth.0, task_id.0.map(|x| vec![x]), &filter).await?; | --------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:367:14 | 367 | pub async fn stat_subtasks_prepare( | ^^^^^^^^^^^^^^^^^^^^^ 368 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/mod.rs#L113
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/mod.rs:113:47 | 113 | let user_subtasks = get_user_subtasks(&db, auth.0.id).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:121:14 | 121 | pub async fn get_user_subtasks( | ^^^^^^^^^^^^^^^^^ 122 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/mod.rs#L78
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/mod.rs:78:17 | 77 | query_subtasks_only( | ------------------- arguments to this function are incorrect 78 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:348:14 | 348 | pub async fn query_subtasks_only( | ^^^^^^^^^^^^^^^^^^^ 349 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L302
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:302:21 | 301 | update_user_subtask( | ------------------- arguments to this function are incorrect 302 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L298
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:298:61 | 298 | send_task_rewards(&self.state.services, &db, auth.0.id, &subtask).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:86:14 | 86 | pub async fn send_task_rewards( | ^^^^^^^^^^^^^^^^^ 87 | services: &Services, 88 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L284
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:284:21 | 283 | update_user_subtask( | ------------------- arguments to this function are incorrect 284 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L259
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:259:45 | 259 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L251
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:251:57 | 251 | get_subtask::<challenges_questions::Entity>(&db, task_id.0, subtask_id.0).await? | ------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/question.rs#L231
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/question.rs:231:17 | 231 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/question.rs#L229
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:229:21 | 229 | blocks: data.0.blocks.update(question.blocks), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/question.rs#L229
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/question.rs:229:35 | 229 | blocks: data.0.blocks.update(question.blocks), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/question.rs#L228
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:228:26 | 228 | punctuation: data.0.punctuation.update(question.punctuation), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L227
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:227:21 | 227 | digits: data.0.digits.update(question.digits), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L226
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:226:28 | 226 | ascii_letters: data.0.ascii_letters.update(question.ascii_letters), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L225
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:225:29 | 225 | case_sensitive: data.0.case_sensitive.update(question.case_sensitive), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L224
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:224:22 | 224 | answers: data.0.answers.update(question.answers), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/question.rs#L224
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/question.rs:224:37 | 224 | answers: data.0.answers.update(question.answers), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/question.rs#L223
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:223:23 | 223 | question: data.0.question.update(question.question), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L199
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:199:13 | 198 | let (question, subtask) = match update_subtask::<challenges_questions::Entity>( | ---------------------------------------------- arguments to this function are incorrect 199 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/question.rs#L183
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/question.rs:183:17 | 183 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/question.rs#L142
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:142:13 | 141 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 142 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L118
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:118:13 | 117 | match query_subtask_admin::<challenges_questions::Entity, _>( | ------------------------------------------------------ arguments to this function are incorrect 118 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L92
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:92:13 | 91 | match query_subtask::<challenges_questions::Entity, _>( | ------------------------------------------------ arguments to this function are incorrect 92 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L64
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:64:17 | 63 | query_subtasks::<challenges_questions::Entity, _>( | ------------------------------------------------- arguments to this function are incorrect 64 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L305
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:305:21 | 304 | update_user_subtask( | ------------------- arguments to this function are incorrect 305 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L301
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:301:61 | 301 | send_task_rewards(&self.state.services, &db, auth.0.id, &subtask).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:86:14 | 86 | pub async fn send_task_rewards( | ^^^^^^^^^^^^^^^^^ 87 | services: &Services, 88 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L287
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:287:21 | 286 | update_user_subtask( | ------------------- arguments to this function are incorrect 287 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L265
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:265:45 | 265 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L252
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:252:70 | 252 | get_subtask::<challenges_multiple_choice_quizes::Entity>(&db, task_id.0, subtask_id.0) | -------------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/multiple_choice.rs#L232
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/multiple_choice.rs:232:17 | 232 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/multiple_choice.rs#L230
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:230:28 | 230 | single_choice: data.0.single_choice.update(mcq.single_choice), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/multiple_choice.rs#L227
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:227:23 | 227 | question: data.0.question.update(mcq.question), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/multiple_choice.rs#L196
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:196:13 | 195 | let (mcq, subtask) = match update_subtask::<challenges_multiple_choice_quizes::Entity>( | ----------------------------------------------------------- arguments to this function are incorrect 196 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/multiple_choice.rs#L180
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/multiple_choice.rs:180:17 | 180 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/multiple_choice.rs#L144
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:144:13 | 143 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 144 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L120
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:120:13 | 119 | match query_subtask_admin::<challenges_multiple_choice_quizes::Entity, _>( | ------------------------------------------------------------------- arguments to this function are incorrect 120 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L94
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:94:13 | 93 | match query_subtask::<challenges_multiple_choice_quizes::Entity, _>( | ------------------------------------------------------------- arguments to this function are incorrect 94 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L66
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:66:17 | 65 | query_subtasks::<challenges_multiple_choice_quizes::Entity, _>( | -------------------------------------------------------------- arguments to this function are incorrect 66 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/matchings.rs#L342
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/matchings.rs:342:21 | 342 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/matchings.rs#L322
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:322:21 | 321 | update_user_subtask( | ------------------- arguments to this function are incorrect 322 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L318
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:318:61 | 318 | send_task_rewards(&self.state.services, &db, auth.0.id, &subtask).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:86:14 | 86 | pub async fn send_task_rewards( | ^^^^^^^^^^^^^^^^^ 87 | services: &Services, 88 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L304
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:304:21 | 303 | update_user_subtask( | ------------------- arguments to this function are incorrect 304 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L276
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:276:45 | 276 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L264
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:264:57 | 264 | get_subtask::<challenges_matchings::Entity>(&db, task_id.0, subtask_id.0).await? | ------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/matchings.rs#L244
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/matchings.rs:244:17 | 244 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/matchings.rs#L238
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:238:23 | 238 | solution: data | _______________________^ 239 | | .0 240 | | .solution 241 | | .map(|x| x.into_iter().map(|x| x as _).collect()) 242 | | .update(matching.solution), | |__________________________________________^ expected `ActiveValue<Vec<i16>>`, found a different `ActiveValue<Vec<i16>>` | = note: `ActiveValue<Vec<i16>>` and `ActiveValue<Vec<i16>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<i16>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<i16>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<i16>>` is not satisfied: challenges/src/endpoints/matchings.rs#L242
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<i16>>` is not satisfied --> challenges/src/endpoints/matchings.rs:242:18 | 242 | .update(matching.solution), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<i16>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<i16>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<i16>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/matchings.rs#L237
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:237:20 | 237 | right: data.0.right.update(matching.right), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/matchings.rs#L237
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/matchings.rs:237:33 | 237 | right: data.0.right.update(matching.right), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/matchings.rs#L236
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:236:19 | 236 | left: data.0.left.update(matching.left), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/matchings.rs#L236
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/matchings.rs:236:31 | 236 | left: data.0.left.update(matching.left), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/matchings.rs#L201
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:201:13 | 200 | let (matching, subtask) = match update_subtask::<challenges_matchings::Entity>( | ---------------------------------------------- arguments to this function are incorrect 201 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/matchings.rs#L185
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/matchings.rs:185:17 | 185 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/matchings.rs#L143
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:143:13 | 142 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 143 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L119
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:119:13 | 118 | match query_subtask_admin::<challenges_matchings::Entity, _>( | ------------------------------------------------------ arguments to this function are incorrect 119 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L93
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:93:13 | 92 | match query_subtask::<challenges_matchings::Entity, _>( | ------------------------------------------------ arguments to this function are incorrect 93 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L65
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:65:17 | 64 | query_subtasks::<challenges_matchings::Entity, _>( | ------------------------------------------------- arguments to this function are incorrect 65 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L131
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:131:50 | 131 | || get_language_leaderboard_user(&db, &language.0, user_id.0), | ----------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/language.rs:112:14 | 112 | pub async fn get_language_leaderboard_user( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 113 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L105
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:105:25 | 104 | get_language_leaderboard( | ------------------------ arguments to this function are incorrect 105 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/language.rs:101:14 | 101 | pub async fn get_language_leaderboard( | ^^^^^^^^^^^^^^^^^^^^^^^^ 102 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L82
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:82:46 | 82 | || get_task_leaderboard_user(&db, task_id.0, user_id.0), | ------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/task.rs:50:14 | 50 | pub async fn get_task_leaderboard_user( | ^^^^^^^^^^^^^^^^^^^^^^^^^ 51 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L62
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:62:41 | 62 | || get_task_leaderboard(&db, &self.state.services, task_id.0, limit.0, offset.0), | -------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/task.rs:39:14 | 39 | pub async fn get_task_leaderboard( | ^^^^^^^^^^^^^^^^^^^^ 40 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L180
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:180:17 | 180 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L171
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:171:17 | 171 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L161
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:161:14 | 161 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L149
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:149:50 | 149 | if let Some((course_task, Some(task))) = challenges_course_tasks::Entity::find() | __________________________________________________^ 150 | | .find_also_related(challenges_tasks::Entity) 151 | | .filter(challenges_course_tasks::Column::CourseId.eq(&course_id.0)) 152 | | .filter(eq( ... | 159 | | )) 160 | | .one(&***db) | |________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L160
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:160:18 | 160 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
mismatched types: challenges/src/endpoints/course_tasks.rs#L106
error[E0308]: mismatched types --> challenges/src/endpoints/course_tasks.rs:106:31 | 106 | match get_course_task(&db, course_id.0, task_id.0).await? { | --------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/course_tasks.rs:218:10 | 218 | async fn get_course_task( | ^^^^^^^^^^^^^^^ 219 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L90
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:90:18 | 90 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L88
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:88:13 | 88 | / query 89 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L89
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:89:22 | 89 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L59
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:59:18 | 59 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L57
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:57:13 | 57 | / query 58 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L58
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:58:22 | 58 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L200
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:200:21 | 200 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L177
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:177:45 | 177 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L160
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:160:65 | 160 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L135
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:135:18 | 135 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L129
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:129:13 | 129 | / challenges_coding_challenge_submissions::Entity::find_by_id(submission_id.0) 130 | | .filter( 131 | | challenges_coding_challenge_submissions::Column::SubtaskId.eq(cc.subtask_id), 132 | | ) 133 | | .filter(challenges_coding_challenge_submissions::Column::Creator.eq(auth.0.id)) 134 | | .one(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L134
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:134:22 | 134 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L119
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:119:65 | 119 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L95
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:95:18 | 95 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L90
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:90:13 | 90 | / cc.find_related(challenges_coding_challenge_submissions::Entity) 91 | | .filter(challenges_coding_challenge_submissions::Column::Creator.eq(auth.0.id)) 92 | | .find_also_related(challenges_coding_challenge_result::Entity) 93 | | .order_by_desc(challenges_coding_challenge_submissions::Column::CreationTimestamp) 94 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L94
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:94:22 | 94 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L79
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:79:65 | 79 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/judge.rs#L49
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/judge.rs:49:65 | 49 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/challenges.rs#L375
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/challenges.rs:375:17 | 375 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L373
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:373:28 | 373 | solution_code: data.0.solution_code.update(cc.solution_code), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L372
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:372:35 | 372 | solution_environment: data.0.solution_environment.update(cc.solution_environment), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L371
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:371:26 | 371 | description: data.0.description.update(cc.description), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L370
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:370:24 | 370 | evaluator: data.0.evaluator.update(cc.evaluator), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L369
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:369:27 | 369 | random_tests: data.0.random_tests.map(|x| x as _).update(cc.random_tests), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i32>`, found `ActiveValue<i32>` | = note: `ActiveValue<i32>` and `sea_orm::ActiveValue<i32>` have similar names, but are actually distinct types note: `ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L368
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:368:27 | 368 | static_tests: data.0.static_tests.map(|x| x as _).update(cc.static_tests), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i32>`, found `ActiveValue<i32>` | = note: `ActiveValue<i32>` and `sea_orm::ActiveValue<i32>` have similar names, but are actually distinct types note: `ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L367
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:367:27 | 367 | memory_limit: data.0.memory_limit.map(|x| x as _).update(cc.memory_limit), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L366
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:366:25 | 366 | time_limit: data.0.time_limit.map(|x| x as _).update(cc.time_limit), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L321
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:321:13 | 320 | let (cc, subtask) = match update_subtask::<challenges_coding_challenges::Entity>( | ------------------------------------------------------ arguments to this function are incorrect 321 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/challenges.rs#L302
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/challenges.rs:302:17 | 302 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L243
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:243:13 | 242 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 243 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L216
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:216:13 | 215 | match query_subtask_admin::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------------- arguments to this function are incorrect 216 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L189
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:189:13 | 188 | match query_subtask_admin::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------------- arguments to this function are incorrect 189 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L125
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:125:13 | 124 | let cc = match query_subtask::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------- arguments to this function are incorrect 125 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L99
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:99:13 | 98 | match query_subtask::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------- arguments to this function are incorrect 99 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L71
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:71:17 | 70 | query_subtasks::<challenges_coding_challenges::Entity, _>( | --------------------------------------------------------- arguments to this function are incorrect 71 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L330
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:330:29 | 330 | task.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/challenges.rs#L328
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:328:29 | 328 | match get_challenge(&db, category_id.0, challenge_id.0).await? { | ------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:413:10 | 413 | async fn get_challenge( | ^^^^^^^^^^^^^ 414 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L308
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:308:25 | 308 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L301
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:301:25 | 301 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/challenges.rs#L299
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:299:34 | 299 | description: data.0.description.update(challenge.description), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L298
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:298:28 | 298 | title: data.0.title.update(challenge.title), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L297
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:297:32 | 297 | skill_ids: data.0.skills.update(challenge.skill_ids), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/challenges.rs#L297
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/challenges.rs:297:46 | 297 | skill_ids: data.0.skills.update(challenge.skill_ids), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/challenges.rs#L296
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:296:34 | 296 | category_id: data.0.category.update(challenge.category_id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<uuid::Uuid>`, found `ActiveValue<Uuid>` | = note: `ActiveValue<Uuid>` and `sea_orm::ActiveValue<uuid::Uuid>` have similar names, but are actually distinct types note: `ActiveValue<Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<uuid::Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied: challenges/src/endpoints/challenges.rs#L296
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied --> challenges/src/endpoints/challenges.rs:296:50 | 296 | category_id: data.0.category.update(challenge.category_id), | ^^^^^^ the trait `std::convert::From<uuid::Uuid>` is not implemented for `sea_query::value::Value`, which is required by `uuid::Uuid: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `uuid::Uuid` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/challenges.rs#L280
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:280:33 | 280 | if get_category(&db, *data.0.category.get_new(&challenge.category_id)) | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/challenges.rs#L278
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:278:29 | 278 | match get_challenge(&db, category_id.0, challenge_id.0).await? { | ------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:413:10 | 413 | async fn get_challenge( | ^^^^^^^^^^^^^ 414 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L259
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:259:17 | 259 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L249
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:249:17 | 249 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/challenges.rs#L234
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:234:43 | 234 | let category = match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/challenges.rs#L219
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:219:29 | 219 | match get_challenge(&db, category_id.0, challenge_id.0).await? { | ------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:413:10 | 413 | async fn get_challenge( | ^^^^^^^^^^^^^ 414 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L200
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:200:18 | 200 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L198
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:198:13 | 198 | / query 199 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L199
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:199:22 | 199 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L173
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:173:33 | 173 | category.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/challenges.rs#L171
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:171:28 | 171 | match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L153
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:153:25 | 153 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/challenges.rs#L150
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:150:34 | 150 | description: data.0.description.update(category.description), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L149
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:149:28 | 149 | title: data.0.title.update(category.title), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L145
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:145:28 | 145 | match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L130
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:130:21 | 130 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/challenges.rs#L109
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:109:46 | 109 | let subtasks = stat_subtasks_prepare(&db, &auth.0, Some(task_ids), &filter).await?; | --------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:367:14 | 367 | pub async fn stat_subtasks_prepare( | ^^^^^^^^^^^^^^^^^^^^^ 368 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/challenges.rs#L108
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:108:47 | 108 | let user_subtasks = get_user_subtasks(&db, auth.0.id).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:121:14 | 121 | pub async fn get_user_subtasks( | ^^^^^^^^^^^^^^^^^ 122 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L97
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:97:14 | 97 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L94
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:94:24 | 94 | let task_ids = challenges_challenges::Entity::find() | ________________________^ 95 | | .filter(challenges_challenges::Column::CategoryId.eq(category_id.0)) 96 | | .all(&***db) | |________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L96
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:96:18 | 96 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
mismatched types: challenges/src/endpoints/challenges.rs#L76
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:76:28 | 76 | match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L61
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:61:18 | 61 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L59
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:59:13 | 59 | / query 60 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L60
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:60:22 | 60 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | help: there are multiple different versions of crate `sea_orm` in the dependency graph --> challenges/src/main.rs:7:5 | 7 | use lib::{config, jwt::JwtSecret, redis::RedisConnection, services::Services, Cache, SharedState}; | ^^^ one version of crate `sea_orm` is used here, as a dependency of crate `poem_ext` ... 12 | use sea_orm::{ConnectOptions, Database}; | ^^^^^^^ one version of crate `sea_orm` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/connection.rs:10:1 | 10 | pub trait ConnectionTrait: Sync { | ------------------------------- this is the required trait --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type implements the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/transaction.rs:17:1 | 17 | pub struct DatabaseTransaction { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this type doesn't implement the required trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
mismatched types: challenges/src/main.rs#L107
error[E0308]: mismatched types --> challenges/src/main.rs:107:44 | 107 | .with(DbTransactionMiddleware::new(db)) | ---------------------------- ^^ expected `DatabaseConnection`, found `sea_orm::DatabaseConnection` | | | arguments to this function are incorrect | = note: `sea_orm::DatabaseConnection` and `DatabaseConnection` have similar names, but are actually distinct types note: `sea_orm::DatabaseConnection` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/database/db_connection.rs:20:1 | 20 | pub enum DatabaseConnection { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `DatabaseConnection` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/database/db_connection.rs:19:1 | 19 | pub enum DatabaseConnection { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used? note: associated function defined here --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/db.rs:65:12 | 65 | pub fn new(db: DatabaseConnection) -> Self { | ^^^
mismatched types: challenges/src/services/subtasks.rs#L666
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:666:18 | 666 | retired: data.retired.update(subtask.retired), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L665
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:665:18 | 665 | enabled: data.enabled.update(subtask.enabled), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L664
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:664:16 | 664 | coins: data.coins.map(|x| x as _).update(subtask.coins), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L663
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:663:13 | 663 | xp: data.xp.map(|x| x as _).update(subtask.xp), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/services/subtasks.rs#L659
error[E0308]: mismatched types --> challenges/src/services/subtasks.rs:659:18 | 659 | task_id: data.task_id.update(subtask.task_id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<uuid::Uuid>`, found `ActiveValue<Uuid>` | = note: `ActiveValue<Uuid>` and `sea_orm::ActiveValue<uuid::Uuid>` have similar names, but are actually distinct types note: `ActiveValue<Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<uuid::Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied: challenges/src/services/subtasks.rs#L659
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied --> challenges/src/services/subtasks.rs:659:31 | 659 | task_id: data.task_id.update(subtask.task_id), | ^^^^^^ the trait `std::convert::From<uuid::Uuid>` is not implemented for `sea_query::value::Value`, which is required by `uuid::Uuid: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `uuid::Uuid` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L164
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:164:27 | 164 | report.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L158
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:158:32 | 158 | subtask.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L150
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:150:21 | 149 | ban_user( | -------- arguments to this function are incorrect 150 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:240:10 | 240 | async fn ban_user( | ^^^^^^^^ 241 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L144
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:144:25 | 144 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L132
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:132:21 | 131 | ban_user( | -------- arguments to this function are incorrect 132 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:240:10 | 240 | async fn ban_user( | ^^^^^^^^ 241 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L120
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:120:18 | 120 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L117
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:117:13 | 117 | / challenges_subtask_reports::Entity::find_by_id(report_id.0) 118 | | .find_also_related(challenges_subtasks::Entity) 119 | | .one(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L119
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:119:22 | 119 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L95
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:95:13 | 94 | let (report, _) = create_report( | ------------- arguments to this function are incorrect 95 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:194:21 | 194 | pub(super) async fn create_report( | ^^^^^^^^^^^^^ 195 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L88
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:88:30 | 88 | match get_active_ban(&db, &auth.0, ChallengesBanAction::Report).await? { | -------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:166:14 | 166 | pub async fn get_active_ban( | ^^^^^^^^^^^^^^ 167 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L83
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:83:45 | 83 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/reports.rs#L76
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/reports.rs:76:46 | 76 | let Some((subtask, _)) = get_subtask(&db, data.0.task_id, data.0.subtask_id).await? else { | ----------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/mod.rs:163:10 | 163 | async fn get_subtask( | ^^^^^^^^^^^ 164 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L61
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:61:18 | 61 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L59
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:59:13 | 59 | / query 60 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/reports.rs#L60
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/reports.rs:60:22 | 60 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L100
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:100:21 | 99 | create_report( | ------------- arguments to this function are incorrect 100 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/reports.rs:194:21 | 194 | pub(super) async fn create_report( | ^^^^^^^^^^^^^ 195 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/feedback.rs#L89
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/feedback.rs:89:18 | 89 | .await?; | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/feedback.rs#L85
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/feedback.rs:85:27 | 85 | let ratings = challenges_user_subtasks::Entity::find() | ___________________________^ 86 | | .filter(challenges_user_subtasks::Column::UserId.eq(subtask.id)) 87 | | .filter(challenges_user_subtasks::Column::Rating.is_not_null()) 88 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/feedback.rs#L88
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/feedback.rs:88:22 | 88 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L55
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:55:13 | 54 | update_user_subtask( | ------------------- arguments to this function are incorrect 55 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L49
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:49:45 | 49 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/feedback.rs#L42
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/feedback.rs:42:46 | 42 | let Some((subtask, _)) = get_subtask(&db, task_id.0, subtask_id.0).await? else { | ----------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/mod.rs:163:10 | 163 | async fn get_subtask( | ^^^^^^^^^^^ 164 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L157
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:157:20 | 157 | ban.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L153
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:153:33 | 153 | let Some(ban) = get_ban(&db, ban_id.0).await? else { | ------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/bans.rs:188:10 | 188 | async fn get_ban( | ^^^^^^^ 189 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L139
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:139:21 | 139 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L137
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:137:25 | 137 | reason: data.reason.update(ban.reason), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L136
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:136:25 | 136 | action: data.action.update(ban.action), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<ChallengesBanAction>`, found a different `ActiveValue<ChallengesBanAction>` | = note: `ActiveValue<ChallengesBanAction>` and `ActiveValue<ChallengesBanAction>` have similar names, but are actually distinct types note: `ActiveValue<ChallengesBanAction>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<ChallengesBanAction>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<entity::sea_orm_active_enums::ChallengesBanAction>` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L136
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<entity::sea_orm_active_enums::ChallengesBanAction>` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:136:37 | 136 | action: data.action.update(ban.action), | ^^^^^^ the trait `std::convert::From<entity::sea_orm_active_enums::ChallengesBanAction>` is not implemented for `sea_query::value::Value`, which is required by `entity::sea_orm_active_enums::ChallengesBanAction: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `entity::sea_orm_active_enums::ChallengesBanAction` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L135
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:135:22 | 135 | end: data.end.map(|x| x.map(|ts| ts.naive_utc())).update(ban.end), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Option<NaiveDateTime>>`, found a different `ActiveValue<Option<NaiveDateTime>>` | = note: `ActiveValue<Option<NaiveDateTime>>` and `ActiveValue<Option<NaiveDateTime>>` have similar names, but are actually distinct types note: `ActiveValue<Option<NaiveDateTime>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Option<NaiveDateTime>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L135
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:135:67 | 135 | end: data.end.map(|x| x.map(|ts| ts.naive_utc())).update(ban.end), | ^^^^^^ the trait `std::convert::From<chrono::NaiveDateTime>` is not implemented for `sea_query::value::Value`, which is required by `std::option::Option<chrono::NaiveDateTime>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `chrono::NaiveDateTime` to implement `std::convert::Into<sea_query::value::Value>` = note: required for `sea_query::value::Value` to implement `std::convert::From<std::option::Option<chrono::NaiveDateTime>>` = note: 1 redundant requirement hidden = note: required for `std::option::Option<chrono::NaiveDateTime>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
the trait bound `chrono::NaiveDateTime: sea_query::value::Nullable` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L135
error[E0277]: the trait bound `chrono::NaiveDateTime: sea_query::value::Nullable` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:135:67 | 135 | end: data.end.map(|x| x.map(|ts| ts.naive_utc())).update(ban.end), | ^^^^^^ the trait `sea_query::value::Nullable` is not implemented for `chrono::NaiveDateTime`, which is required by `std::option::Option<chrono::NaiveDateTime>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `sea_query::value::Nullable`: &str bool char f32 f64 i16 i32 i64 and 7 others = note: required for `sea_query::value::Value` to implement `std::convert::From<std::option::Option<chrono::NaiveDateTime>>` = note: required for `std::option::Option<chrono::NaiveDateTime>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L134
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:134:24 | 134 | start: data.start.map(|ts| ts.naive_utc()).update(ban.start), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<NaiveDateTime>`, found a different `ActiveValue<NaiveDateTime>` | = note: `ActiveValue<NaiveDateTime>` and `ActiveValue<NaiveDateTime>` have similar names, but are actually distinct types note: `ActiveValue<NaiveDateTime>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<NaiveDateTime>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L134
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<chrono::NaiveDateTime>` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:134:60 | 134 | start: data.start.map(|ts| ts.naive_utc()).update(ban.start), | ^^^^^^ the trait `std::convert::From<chrono::NaiveDateTime>` is not implemented for `sea_query::value::Value`, which is required by `chrono::NaiveDateTime: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `chrono::NaiveDateTime` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/subtasks/bans.rs#L114
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/bans.rs:114:33 | 114 | let Some(ban) = get_ban(&db, ban_id.0).await? else { | ------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/subtasks/bans.rs:188:10 | 188 | async fn get_ban( | ^^^^^^^ 189 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L99
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:99:21 | 99 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L69
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:69:18 | 69 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L67
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:67:13 | 67 | / query 68 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/bans.rs#L68
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/bans.rs:68:22 | 68 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L142
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:142:24 | 142 | subtask.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L133
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:133:14 | 133 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L130
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:130:29 | 130 | let Some(subtask) = challenges_subtasks::Entity::find_by_id(subtask_id.0) | _____________________________^ 131 | | .filter(challenges_subtasks::Column::TaskId.eq(task_id.0)) 132 | | .one(&***db) | |________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/subtasks/mod.rs#L132
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/subtasks/mod.rs:132:18 | 132 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
mismatched types: challenges/src/endpoints/subtasks/mod.rs#L115
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/mod.rs:115:35 | 115 | stat_subtasks_prepare(&db, &auth.0, task_id.0.map(|x| vec![x]), &filter).await?; | --------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:367:14 | 367 | pub async fn stat_subtasks_prepare( | ^^^^^^^^^^^^^^^^^^^^^ 368 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/mod.rs#L113
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/mod.rs:113:47 | 113 | let user_subtasks = get_user_subtasks(&db, auth.0.id).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:121:14 | 121 | pub async fn get_user_subtasks( | ^^^^^^^^^^^^^^^^^ 122 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/subtasks/mod.rs#L78
error[E0308]: mismatched types --> challenges/src/endpoints/subtasks/mod.rs:78:17 | 77 | query_subtasks_only( | ------------------- arguments to this function are incorrect 78 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:348:14 | 348 | pub async fn query_subtasks_only( | ^^^^^^^^^^^^^^^^^^^ 349 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L302
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:302:21 | 301 | update_user_subtask( | ------------------- arguments to this function are incorrect 302 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L298
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:298:61 | 298 | send_task_rewards(&self.state.services, &db, auth.0.id, &subtask).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:86:14 | 86 | pub async fn send_task_rewards( | ^^^^^^^^^^^^^^^^^ 87 | services: &Services, 88 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L284
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:284:21 | 283 | update_user_subtask( | ------------------- arguments to this function are incorrect 284 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L259
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:259:45 | 259 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L251
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:251:57 | 251 | get_subtask::<challenges_questions::Entity>(&db, task_id.0, subtask_id.0).await? | ------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/question.rs#L231
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/question.rs:231:17 | 231 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/question.rs#L229
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:229:21 | 229 | blocks: data.0.blocks.update(question.blocks), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/question.rs#L229
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/question.rs:229:35 | 229 | blocks: data.0.blocks.update(question.blocks), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/question.rs#L228
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:228:26 | 228 | punctuation: data.0.punctuation.update(question.punctuation), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L227
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:227:21 | 227 | digits: data.0.digits.update(question.digits), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L226
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:226:28 | 226 | ascii_letters: data.0.ascii_letters.update(question.ascii_letters), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L225
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:225:29 | 225 | case_sensitive: data.0.case_sensitive.update(question.case_sensitive), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L224
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:224:22 | 224 | answers: data.0.answers.update(question.answers), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/question.rs#L224
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/question.rs:224:37 | 224 | answers: data.0.answers.update(question.answers), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/question.rs#L223
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:223:23 | 223 | question: data.0.question.update(question.question), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/question.rs#L199
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:199:13 | 198 | let (question, subtask) = match update_subtask::<challenges_questions::Entity>( | ---------------------------------------------- arguments to this function are incorrect 199 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/question.rs#L183
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/question.rs:183:17 | 183 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/question.rs#L142
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:142:13 | 141 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 142 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L118
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:118:13 | 117 | match query_subtask_admin::<challenges_questions::Entity, _>( | ------------------------------------------------------ arguments to this function are incorrect 118 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L92
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:92:13 | 91 | match query_subtask::<challenges_questions::Entity, _>( | ------------------------------------------------ arguments to this function are incorrect 92 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/question.rs#L64
error[E0308]: mismatched types --> challenges/src/endpoints/question.rs:64:17 | 63 | query_subtasks::<challenges_questions::Entity, _>( | ------------------------------------------------- arguments to this function are incorrect 64 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L305
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:305:21 | 304 | update_user_subtask( | ------------------- arguments to this function are incorrect 305 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L301
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:301:61 | 301 | send_task_rewards(&self.state.services, &db, auth.0.id, &subtask).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:86:14 | 86 | pub async fn send_task_rewards( | ^^^^^^^^^^^^^^^^^ 87 | services: &Services, 88 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L287
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:287:21 | 286 | update_user_subtask( | ------------------- arguments to this function are incorrect 287 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L265
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:265:45 | 265 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L252
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:252:70 | 252 | get_subtask::<challenges_multiple_choice_quizes::Entity>(&db, task_id.0, subtask_id.0) | -------------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/multiple_choice.rs#L232
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/multiple_choice.rs:232:17 | 232 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/multiple_choice.rs#L230
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:230:28 | 230 | single_choice: data.0.single_choice.update(mcq.single_choice), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<bool>`, found `ActiveValue<bool>` | = note: `ActiveValue<bool>` and `sea_orm::ActiveValue<bool>` have similar names, but are actually distinct types note: `ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<bool>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/multiple_choice.rs#L227
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:227:23 | 227 | question: data.0.question.update(mcq.question), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/multiple_choice.rs#L196
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:196:13 | 195 | let (mcq, subtask) = match update_subtask::<challenges_multiple_choice_quizes::Entity>( | ----------------------------------------------------------- arguments to this function are incorrect 196 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/multiple_choice.rs#L180
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/multiple_choice.rs:180:17 | 180 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/multiple_choice.rs#L144
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:144:13 | 143 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 144 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L120
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:120:13 | 119 | match query_subtask_admin::<challenges_multiple_choice_quizes::Entity, _>( | ------------------------------------------------------------------- arguments to this function are incorrect 120 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L94
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:94:13 | 93 | match query_subtask::<challenges_multiple_choice_quizes::Entity, _>( | ------------------------------------------------------------- arguments to this function are incorrect 94 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/multiple_choice.rs#L66
error[E0308]: mismatched types --> challenges/src/endpoints/multiple_choice.rs:66:17 | 65 | query_subtasks::<challenges_multiple_choice_quizes::Entity, _>( | -------------------------------------------------------------- arguments to this function are incorrect 66 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/matchings.rs#L342
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/matchings.rs:342:21 | 342 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/matchings.rs#L322
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:322:21 | 321 | update_user_subtask( | ------------------- arguments to this function are incorrect 322 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L318
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:318:61 | 318 | send_task_rewards(&self.state.services, &db, auth.0.id, &subtask).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:86:14 | 86 | pub async fn send_task_rewards( | ^^^^^^^^^^^^^^^^^ 87 | services: &Services, 88 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L304
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:304:21 | 303 | update_user_subtask( | ------------------- arguments to this function are incorrect 304 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:146:14 | 146 | pub async fn update_user_subtask( | ^^^^^^^^^^^^^^^^^^^ 147 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L276
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:276:45 | 276 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L264
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:264:57 | 264 | get_subtask::<challenges_matchings::Entity>(&db, task_id.0, subtask_id.0).await? | ------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/matchings.rs#L244
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/matchings.rs:244:17 | 244 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/matchings.rs#L238
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:238:23 | 238 | solution: data | _______________________^ 239 | | .0 240 | | .solution 241 | | .map(|x| x.into_iter().map(|x| x as _).collect()) 242 | | .update(matching.solution), | |__________________________________________^ expected `ActiveValue<Vec<i16>>`, found a different `ActiveValue<Vec<i16>>` | = note: `ActiveValue<Vec<i16>>` and `ActiveValue<Vec<i16>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<i16>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<i16>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<i16>>` is not satisfied: challenges/src/endpoints/matchings.rs#L242
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<i16>>` is not satisfied --> challenges/src/endpoints/matchings.rs:242:18 | 242 | .update(matching.solution), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<i16>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<i16>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<i16>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/matchings.rs#L237
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:237:20 | 237 | right: data.0.right.update(matching.right), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/matchings.rs#L237
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/matchings.rs:237:33 | 237 | right: data.0.right.update(matching.right), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/matchings.rs#L236
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:236:19 | 236 | left: data.0.left.update(matching.left), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/matchings.rs#L236
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/matchings.rs:236:31 | 236 | left: data.0.left.update(matching.left), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/matchings.rs#L201
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:201:13 | 200 | let (matching, subtask) = match update_subtask::<challenges_matchings::Entity>( | ---------------------------------------------- arguments to this function are incorrect 201 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/matchings.rs#L185
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/matchings.rs:185:17 | 185 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/matchings.rs#L143
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:143:13 | 142 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 143 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L119
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:119:13 | 118 | match query_subtask_admin::<challenges_matchings::Entity, _>( | ------------------------------------------------------ arguments to this function are incorrect 119 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L93
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:93:13 | 92 | match query_subtask::<challenges_matchings::Entity, _>( | ------------------------------------------------ arguments to this function are incorrect 93 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/matchings.rs#L65
error[E0308]: mismatched types --> challenges/src/endpoints/matchings.rs:65:17 | 64 | query_subtasks::<challenges_matchings::Entity, _>( | ------------------------------------------------- arguments to this function are incorrect 65 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L131
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:131:50 | 131 | || get_language_leaderboard_user(&db, &language.0, user_id.0), | ----------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/language.rs:112:14 | 112 | pub async fn get_language_leaderboard_user( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 113 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L105
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:105:25 | 104 | get_language_leaderboard( | ------------------------ arguments to this function are incorrect 105 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/language.rs:101:14 | 101 | pub async fn get_language_leaderboard( | ^^^^^^^^^^^^^^^^^^^^^^^^ 102 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L82
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:82:46 | 82 | || get_task_leaderboard_user(&db, task_id.0, user_id.0), | ------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/task.rs:50:14 | 50 | pub async fn get_task_leaderboard_user( | ^^^^^^^^^^^^^^^^^^^^^^^^^ 51 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/leaderboard.rs#L62
error[E0308]: mismatched types --> challenges/src/endpoints/leaderboard.rs:62:41 | 62 | || get_task_leaderboard(&db, &self.state.services, task_id.0, limit.0, offset.0), | -------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/leaderboard/task.rs:39:14 | 39 | pub async fn get_task_leaderboard( | ^^^^^^^^^^^^^^^^^^^^ 40 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L180
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:180:17 | 180 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L171
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:171:17 | 171 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L161
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:161:14 | 161 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L149
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:149:50 | 149 | if let Some((course_task, Some(task))) = challenges_course_tasks::Entity::find() | __________________________________________________^ 150 | | .find_also_related(challenges_tasks::Entity) 151 | | .filter(challenges_course_tasks::Column::CourseId.eq(&course_id.0)) 152 | | .filter(eq( ... | 159 | | )) 160 | | .one(&***db) | |________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L160
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:160:18 | 160 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:495:12 | 493 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 494 | where 495 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::one`
mismatched types: challenges/src/endpoints/course_tasks.rs#L106
error[E0308]: mismatched types --> challenges/src/endpoints/course_tasks.rs:106:31 | 106 | match get_course_task(&db, course_id.0, task_id.0).await? { | --------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/course_tasks.rs:218:10 | 218 | async fn get_course_task( | ^^^^^^^^^^^^^^^ 219 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L90
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:90:18 | 90 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L88
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:88:13 | 88 | / query 89 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L89
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:89:22 | 89 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L59
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:59:18 | 59 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L57
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:57:13 | 57 | / query 58 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/course_tasks.rs#L58
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/course_tasks.rs:58:22 | 58 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L200
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:200:21 | 200 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L177
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:177:45 | 177 | let user_subtask = get_user_subtask(&db, auth.0.id, subtask.id).await?; | ---------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:134:14 | 134 | pub async fn get_user_subtask( | ^^^^^^^^^^^^^^^^ 135 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L160
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:160:65 | 160 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L135
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:135:18 | 135 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L129
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:129:13 | 129 | / challenges_coding_challenge_submissions::Entity::find_by_id(submission_id.0) 130 | | .filter( 131 | | challenges_coding_challenge_submissions::Column::SubtaskId.eq(cc.subtask_id), 132 | | ) 133 | | .filter(challenges_coding_challenge_submissions::Column::Creator.eq(auth.0.id)) 134 | | .one(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L134
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:134:22 | 134 | .one(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::one` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:417:12 | 415 | pub async fn one<'a, C>(self, db: &C) -> Result<Option<E::Model>, DbErr> | --- required by a bound in this associated function 416 | where 417 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::one`
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L119
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:119:65 | 119 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L95
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:95:18 | 95 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L90
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:90:13 | 90 | / cc.find_related(challenges_coding_challenge_submissions::Entity) 91 | | .filter(challenges_coding_challenge_submissions::Column::Creator.eq(auth.0.id)) 92 | | .find_also_related(challenges_coding_challenge_result::Entity) 93 | | .order_by_desc(challenges_coding_challenge_submissions::Column::CreationTimestamp) 94 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/submissions.rs#L94
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/submissions.rs:94:22 | 94 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
mismatched types: challenges/src/endpoints/coding_challenges/submissions.rs#L79
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/submissions.rs:79:65 | 79 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/judge.rs#L49
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/judge.rs:49:65 | 49 | get_subtask::<challenges_coding_challenges::Entity>(&db, task_id.0, subtask_id.0) | --------------------------------------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:550:14 | 550 | pub async fn get_subtask<E>( | ^^^^^^^^^^^ 551 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/challenges.rs#L375
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/challenges.rs:375:17 | 375 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L373
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:373:28 | 373 | solution_code: data.0.solution_code.update(cc.solution_code), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L372
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:372:35 | 372 | solution_environment: data.0.solution_environment.update(cc.solution_environment), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L371
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:371:26 | 371 | description: data.0.description.update(cc.description), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L370
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:370:24 | 370 | evaluator: data.0.evaluator.update(cc.evaluator), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L369
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:369:27 | 369 | random_tests: data.0.random_tests.map(|x| x as _).update(cc.random_tests), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i32>`, found `ActiveValue<i32>` | = note: `ActiveValue<i32>` and `sea_orm::ActiveValue<i32>` have similar names, but are actually distinct types note: `ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L368
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:368:27 | 368 | static_tests: data.0.static_tests.map(|x| x as _).update(cc.static_tests), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i32>`, found `ActiveValue<i32>` | = note: `ActiveValue<i32>` and `sea_orm::ActiveValue<i32>` have similar names, but are actually distinct types note: `ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i32>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L367
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:367:27 | 367 | memory_limit: data.0.memory_limit.map(|x| x as _).update(cc.memory_limit), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L366
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:366:25 | 366 | time_limit: data.0.time_limit.map(|x| x as _).update(cc.time_limit), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<i64>`, found `ActiveValue<i64>` | = note: `ActiveValue<i64>` and `sea_orm::ActiveValue<i64>` have similar names, but are actually distinct types note: `ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<i64>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L321
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:321:13 | 320 | let (cc, subtask) = match update_subtask::<challenges_coding_challenges::Entity>( | ------------------------------------------------------ arguments to this function are incorrect 321 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:635:14 | 635 | pub async fn update_subtask<E>( | ^^^^^^^^^^^^^^ 636 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/coding_challenges/challenges.rs#L302
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/coding_challenges/challenges.rs:302:17 | 302 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L243
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:243:13 | 242 | let subtask = match create_subtask( | -------------- arguments to this function are incorrect 243 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:572:14 | 572 | pub async fn create_subtask( | ^^^^^^^^^^^^^^ 573 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L216
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:216:13 | 215 | match query_subtask_admin::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------------- arguments to this function are incorrect 216 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L189
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:189:13 | 188 | match query_subtask_admin::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------------- arguments to this function are incorrect 189 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:519:14 | 519 | pub async fn query_subtask_admin<E, T>( | ^^^^^^^^^^^^^^^^^^^ 520 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L125
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:125:13 | 124 | let cc = match query_subtask::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------- arguments to this function are incorrect 125 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L99
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:99:13 | 98 | match query_subtask::<challenges_coding_challenges::Entity, _>( | -------------------------------------------------------- arguments to this function are incorrect 99 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:493:14 | 493 | pub async fn query_subtask<E, T>( | ^^^^^^^^^^^^^ 494 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/coding_challenges/challenges.rs#L71
error[E0308]: mismatched types --> challenges/src/endpoints/coding_challenges/challenges.rs:71:17 | 70 | query_subtasks::<challenges_coding_challenges::Entity, _>( | --------------------------------------------------------- arguments to this function are incorrect 71 | &db, | ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:410:14 | 410 | pub async fn query_subtasks<E, T>( | ^^^^^^^^^^^^^^ 411 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L330
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:330:29 | 330 | task.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/challenges.rs#L328
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:328:29 | 328 | match get_challenge(&db, category_id.0, challenge_id.0).await? { | ------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:413:10 | 413 | async fn get_challenge( | ^^^^^^^^^^^^^ 414 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L308
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:308:25 | 308 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L301
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:301:25 | 301 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/challenges.rs#L299
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:299:34 | 299 | description: data.0.description.update(challenge.description), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L298
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:298:28 | 298 | title: data.0.title.update(challenge.title), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L297
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:297:32 | 297 | skill_ids: data.0.skills.update(challenge.skill_ids), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<Vec<String>>`, found a different `ActiveValue<Vec<String>>` | = note: `ActiveValue<Vec<String>>` and `ActiveValue<Vec<String>>` have similar names, but are actually distinct types note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<Vec<String>>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied: challenges/src/endpoints/challenges.rs#L297
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<std::vec::Vec<std::string::String>>` is not satisfied --> challenges/src/endpoints/challenges.rs:297:46 | 297 | skill_ids: data.0.skills.update(challenge.skill_ids), | ^^^^^^ the trait `std::convert::From<std::vec::Vec<std::string::String>>` is not implemented for `sea_query::value::Value`, which is required by `std::vec::Vec<std::string::String>: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `std::vec::Vec<std::string::String>` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/challenges.rs#L296
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:296:34 | 296 | category_id: data.0.category.update(challenge.category_id), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `sea_orm::ActiveValue<uuid::Uuid>`, found `ActiveValue<Uuid>` | = note: `ActiveValue<Uuid>` and `sea_orm::ActiveValue<uuid::Uuid>` have similar names, but are actually distinct types note: `ActiveValue<Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `sea_orm::ActiveValue<uuid::Uuid>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied: challenges/src/endpoints/challenges.rs#L296
error[E0277]: the trait bound `sea_query::value::Value: std::convert::From<uuid::Uuid>` is not satisfied --> challenges/src/endpoints/challenges.rs:296:50 | 296 | category_id: data.0.category.update(challenge.category_id), | ^^^^^^ the trait `std::convert::From<uuid::Uuid>` is not implemented for `sea_query::value::Value`, which is required by `uuid::Uuid: std::convert::Into<sea_query::value::Value>` | = help: the following other types implement trait `std::convert::From<T>`: `sea_query::value::Value` implements `std::convert::From<&[u8]>` `sea_query::value::Value` implements `std::convert::From<&std::string::String>` `sea_query::value::Value` implements `std::convert::From<&str>` `sea_query::value::Value` implements `std::convert::From<bool>` `sea_query::value::Value` implements `std::convert::From<char>` `sea_query::value::Value` implements `std::convert::From<f32>` `sea_query::value::Value` implements `std::convert::From<f64>` `sea_query::value::Value` implements `std::convert::From<i16>` and 11 others = note: required for `uuid::Uuid` to implement `std::convert::Into<sea_query::value::Value>` note: required by a bound in `poem_ext::patch_value::PatchValue::<T>::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-ext-0.12.0/src/patch_value.rs:98:12 | 96 | pub fn update(self, old: T) -> ActiveValue<T> | ------ required by a bound in this associated function 97 | where 98 | T: Into<sea_orm::Value>, | ^^^^^^^^^^^^^^^^^^^^ required by this bound in `PatchValue::<T>::update`
mismatched types: challenges/src/endpoints/challenges.rs#L280
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:280:33 | 280 | if get_category(&db, *data.0.category.get_new(&challenge.category_id)) | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/challenges.rs#L278
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:278:29 | 278 | match get_challenge(&db, category_id.0, challenge_id.0).await? { | ------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:413:10 | 413 | async fn get_challenge( | ^^^^^^^^^^^^^ 414 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L259
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:259:17 | 259 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L249
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:249:17 | 249 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/challenges.rs#L234
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:234:43 | 234 | let category = match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/challenges.rs#L219
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:219:29 | 219 | match get_challenge(&db, category_id.0, challenge_id.0).await? { | ------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:413:10 | 413 | async fn get_challenge( | ^^^^^^^^^^^^^ 414 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L200
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:200:18 | 200 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L198
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:198:13 | 198 | / query 199 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L199
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:199:22 | 199 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::SelectTwo<E, F>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:503:12 | 501 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<(E::Model, Option<F::Model>)>, DbErr> | --- required by a bound in this associated function 502 | where 503 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl SelectTwo<E, F>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L173
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:173:33 | 173 | category.delete(&***db).await?; | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ModelTrait::delete` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/model.rs:44:12 | 41 | async fn delete<'a, A, C>(self, db: &'a C) -> Result<DeleteResult, DbErr> | ------ required by a bound in this associated function ... 44 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ModelTrait::delete`
mismatched types: challenges/src/endpoints/challenges.rs#L171
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:171:28 | 171 | match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L153
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:153:25 | 153 | .update(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::update` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:402:12 | 398 | async fn update<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 402 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::update`
mismatched types: challenges/src/endpoints/challenges.rs#L150
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:150:34 | 150 | description: data.0.description.update(category.description), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L149
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:149:28 | 149 | title: data.0.title.update(category.title), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ActiveValue<String>`, found a different `ActiveValue<String>` | = note: `ActiveValue<String>` and `ActiveValue<String>` have similar names, but are actually distinct types note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-0.12.15/src/entity/active_model.rs:39:1 | 39 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ note: `ActiveValue<String>` is defined in crate `sea_orm` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:40:1 | 40 | pub enum ActiveValue<V> | ^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `sea_orm` are being used?
mismatched types: challenges/src/endpoints/challenges.rs#L145
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:145:28 | 145 | match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L130
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:130:21 | 130 | .insert(&***db) | ------ ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::ActiveModelTrait::insert` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/entity/active_model.rs:280:12 | 276 | async fn insert<'a, C>(self, db: &'a C) -> Result<<Self::Entity as EntityTrait>::Model, DbErr> | ------ required by a bound in this associated function ... 280 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `ActiveModelTrait::insert`
mismatched types: challenges/src/endpoints/challenges.rs#L109
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:109:46 | 109 | let subtasks = stat_subtasks_prepare(&db, &auth.0, Some(task_ids), &filter).await?; | --------------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:367:14 | 367 | pub async fn stat_subtasks_prepare( | ^^^^^^^^^^^^^^^^^^^^^ 368 | db: &DatabaseTransaction, | ------------------------
mismatched types: challenges/src/endpoints/challenges.rs#L108
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:108:47 | 108 | let user_subtasks = get_user_subtasks(&db, auth.0.id).await?; | ----------------- ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/services/subtasks.rs:121:14 | 121 | pub async fn get_user_subtasks( | ^^^^^^^^^^^^^^^^^ 122 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L97
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:97:14 | 97 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L94
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:94:24 | 94 | let task_ids = challenges_challenges::Entity::find() | ________________________^ 95 | | .filter(challenges_challenges::Column::CategoryId.eq(category_id.0)) 96 | | .all(&***db) | |________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L96
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:96:18 | 96 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
mismatched types: challenges/src/endpoints/challenges.rs#L76
error[E0308]: mismatched types --> challenges/src/endpoints/challenges.rs:76:28 | 76 | match get_category(&db, category_id.0).await? { | ------------ ^^^ expected `&DatabaseTransaction`, found `&Data<&Arc<DatabaseTransaction>>` | | | arguments to this function are incorrect | = note: expected reference `&sea_orm::DatabaseTransaction` found reference `&poem::web::Data<&std::sync::Arc<sea_orm::database::transaction::DatabaseTransaction>>` note: function defined here --> challenges/src/endpoints/challenges.rs:402:10 | 402 | async fn get_category( | ^^^^^^^^^^^^ 403 | db: &DatabaseTransaction, | ------------------------
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L61
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:61:18 | 61 | .await? | ^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L59
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:59:13 | 59 | / query 60 | | .all(&***db) | |____________________________^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied: challenges/src/endpoints/challenges.rs#L60
error[E0277]: the trait bound `sea_orm::database::transaction::DatabaseTransaction: sea_orm::ConnectionTrait` is not satisfied --> challenges/src/endpoints/challenges.rs:60:22 | 60 | .all(&***db) | --- ^^^^^^ the trait `sea_orm::ConnectionTrait` is not implemented for `sea_orm::database::transaction::DatabaseTransaction` | | | required by a bound introduced by this call | = help: the following other types implement trait `sea_orm::ConnectionTrait`: sea_orm::DatabaseConnection sea_orm::DatabaseTransaction note: required by a bound in `sea_orm::executor::select::<impl sea_orm::Select<E>>::all` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sea-orm-1.0.1/src/executor/select.rs:425:12 | 423 | pub async fn all<'a, C>(self, db: &C) -> Result<Vec<E::Model>, DbErr> | --- required by a bound in this associated function 424 | where 425 | C: ConnectionTrait, | ^^^^^^^^^^^^^^^ required by this bound in `sea_orm::executor::select::<impl Select<E>>::all`
test (stable)
Process completed with exit code 101.
test (beta)
The job was canceled because "stable" failed.
test (beta)
The operation was canceled.