Skip to content

Commit 31416f2

Browse files
authored
cleanup large enum variants (#906)
* clippy? * cleanup TableRef
1 parent f778d36 commit 31416f2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/query/select.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ impl SelectStatement {
10331033
where
10341034
T: IntoIden,
10351035
{
1036-
self.from_from(TableRef::SubQuery(query, alias.into_iden()))
1036+
self.from_from(TableRef::SubQuery(query.into(), alias.into_iden()))
10371037
}
10381038

10391039
/// From function call.
@@ -1612,7 +1612,7 @@ impl SelectStatement {
16121612
{
16131613
self.join_join(
16141614
join,
1615-
TableRef::SubQuery(query, alias.into_iden()),
1615+
TableRef::SubQuery(query.into(), alias.into_iden()),
16161616
JoinOn::Condition(Box::new(ConditionHolder::new_with_condition(
16171617
condition.into_condition(),
16181618
))),
@@ -1678,7 +1678,7 @@ impl SelectStatement {
16781678
{
16791679
self.join_join(
16801680
join,
1681-
TableRef::SubQuery(query, alias.into_iden()),
1681+
TableRef::SubQuery(query.into(), alias.into_iden()),
16821682
JoinOn::Condition(Box::new(ConditionHolder::new_with_condition(
16831683
condition.into_condition(),
16841684
))),

src/types.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ pub trait IntoColumnRef {
159159
}
160160

161161
/// Table references
162-
#[allow(clippy::large_enum_variant)]
163162
#[derive(Debug, Clone, PartialEq)]
164163
#[non_exhaustive]
165164
pub enum TableRef {
@@ -176,7 +175,7 @@ pub enum TableRef {
176175
/// Table identifier with database and schema prefix and alias
177176
DatabaseSchemaTableAlias(DynIden, DynIden, DynIden, DynIden),
178177
/// Subquery with alias
179-
SubQuery(SelectStatement, DynIden),
178+
SubQuery(Box<SelectStatement>, DynIden),
180179
/// Values list with alias
181180
ValuesList(Vec<ValueTuple>, DynIden),
182181
/// Function call with alias

0 commit comments

Comments
 (0)