Skip to content

Commit d4abd48

Browse files
authored
Remove redundant Expr::expr from internal code (#2554)
1 parent 6e1fc37 commit d4abd48

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

sea-orm-migration/src/migrator.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use std::time::SystemTime;
66
use tracing::info;
77

88
use sea_orm::sea_query::{
9-
self, extension::postgres::Type, Alias, Expr, ForeignKey, IntoIden, JoinType, Order, Query,
10-
SelectStatement, SimpleExpr, Table,
9+
self, extension::postgres::Type, Alias, Expr, ExprTrait, ForeignKey, IntoIden, JoinType, Order,
10+
Query, SelectStatement, SimpleExpr, Table,
1111
};
1212
use sea_orm::{
1313
ActiveModelTrait, ActiveValue, Condition, ConnectionTrait, DbBackend, DbErr, DeriveIden,
@@ -487,7 +487,7 @@ where
487487
))
488488
.cond_where(
489489
Condition::all()
490-
.add(Expr::expr(get_current_schema(db)).equals((
490+
.add(get_current_schema(db).equals((
491491
InformationSchema::TableConstraints,
492492
InformationSchema::TableSchema,
493493
)))
@@ -532,10 +532,7 @@ where
532532
)
533533
.cond_where(
534534
Condition::all()
535-
.add(
536-
Expr::expr(get_current_schema(db))
537-
.equals((PgNamespace::Table, PgNamespace::Nspname)),
538-
)
535+
.add(get_current_schema(db).equals((PgNamespace::Table, PgNamespace::Nspname)))
539536
.add(Expr::col((PgType::Table, PgType::Typelem)).eq(0)),
540537
);
541538
stmt

0 commit comments

Comments
 (0)