@@ -27,13 +27,13 @@ use super::{
27
27
FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList , FunctionArguments ,
28
28
GroupByExpr , HavingBound , IlikeSelectItem , Insert , Interpolate , InterpolateExpr , Join ,
29
29
JoinConstraint , JoinOperator , JsonPath , JsonPathElem , LateralView , MatchRecognizePattern ,
30
- Measure , NamedWindowDefinition , ObjectName , ObjectNamePart , Offset , OnConflict ,
31
- OnConflictAction , OnInsert , OrderBy , OrderByExpr , Partition , PivotValueSource ,
32
- ProjectionSelect , Query , ReferentialAction , RenameSelectItem , ReplaceSelectElement ,
33
- ReplaceSelectItem , Select , SelectInto , SelectItem , SetExpr , SqlOption , Statement , Subscript ,
34
- SymbolDefinition , TableAlias , TableAliasColumnDef , TableConstraint , TableFactor , TableObject ,
35
- TableOptionsClustered , TableWithJoins , UpdateTableFromKind , Use , Value , Values , ViewColumnDef ,
36
- WildcardAdditionalOptions , With , WithFill ,
30
+ Measure , NamedWindowDefinition , ObjectName , Offset , OnConflict , OnConflictAction , OnInsert ,
31
+ OrderBy , OrderByExpr , Partition , PivotValueSource , ProjectionSelect , Query , ReferentialAction ,
32
+ RenameSelectItem , ReplaceSelectElement , ReplaceSelectItem , Select , SelectInto , SelectItem ,
33
+ SetExpr , SqlOption , Statement , Subscript , SymbolDefinition , TableAlias , TableAliasColumnDef ,
34
+ TableConstraint , TableFactor , TableObject , TableOptionsClustered , TableWithJoins ,
35
+ UpdateTableFromKind , Use , Value , Values , ViewColumnDef , WildcardAdditionalOptions , With ,
36
+ WithFill ,
37
37
} ;
38
38
39
39
/// Given an iterator of spans, return the [Span::union] of all spans.
@@ -1385,7 +1385,7 @@ impl Spanned for Expr {
1385
1385
. union_opt ( & overlay_for. as_ref ( ) . map ( |i| i. span ( ) ) ) ,
1386
1386
Expr :: Collate { expr, collation } => expr
1387
1387
. span ( )
1388
- . union ( & union_spans ( collation. 0 . iter ( ) . map ( |i| i. span ( ) ) ) ) ,
1388
+ . union ( & union_spans ( collation. 0 . iter ( ) . map ( |i| i. span ) ) ) ,
1389
1389
Expr :: Nested ( expr) => expr. span ( ) ,
1390
1390
Expr :: Value ( value) => value. span ( ) ,
1391
1391
Expr :: TypedString { .. } => Span :: empty ( ) ,
@@ -1489,7 +1489,7 @@ impl Spanned for Expr {
1489
1489
object_name
1490
1490
. 0
1491
1491
. iter ( )
1492
- . map ( |i| i. span ( ) )
1492
+ . map ( |i| i. span )
1493
1493
. chain ( iter:: once ( token. 0 . span ) ) ,
1494
1494
) ,
1495
1495
Expr :: OuterJoin ( expr) => expr. span ( ) ,
@@ -1534,15 +1534,7 @@ impl Spanned for ObjectName {
1534
1534
fn span ( & self ) -> Span {
1535
1535
let ObjectName ( segments) = self ;
1536
1536
1537
- union_spans ( segments. iter ( ) . map ( |i| i. span ( ) ) )
1538
- }
1539
- }
1540
-
1541
- impl Spanned for ObjectNamePart {
1542
- fn span ( & self ) -> Span {
1543
- match self {
1544
- ObjectNamePart :: Identifier ( ident) => ident. span ,
1545
- }
1537
+ union_spans ( segments. iter ( ) . map ( |i| i. span ) )
1546
1538
}
1547
1539
}
1548
1540
@@ -1573,7 +1565,7 @@ impl Spanned for Function {
1573
1565
union_spans (
1574
1566
name. 0
1575
1567
. iter ( )
1576
- . map ( |i| i. span ( ) )
1568
+ . map ( |i| i. span )
1577
1569
. chain ( iter:: once ( args. span ( ) ) )
1578
1570
. chain ( iter:: once ( parameters. span ( ) ) )
1579
1571
. chain ( filter. iter ( ) . map ( |i| i. span ( ) ) )
@@ -1659,7 +1651,7 @@ impl Spanned for SelectItem {
1659
1651
object_name
1660
1652
. 0
1661
1653
. iter ( )
1662
- . map ( |i| i. span ( ) )
1654
+ . map ( |i| i. span )
1663
1655
. chain ( iter:: once ( wildcard_additional_options. span ( ) ) ) ,
1664
1656
) ,
1665
1657
SelectItem :: Wildcard ( wildcard_additional_options) => wildcard_additional_options. span ( ) ,
@@ -1769,7 +1761,7 @@ impl Spanned for TableFactor {
1769
1761
} => union_spans (
1770
1762
name. 0
1771
1763
. iter ( )
1772
- . map ( |i| i. span ( ) )
1764
+ . map ( |i| i. span )
1773
1765
. chain ( alias. as_ref ( ) . map ( |alias| {
1774
1766
union_spans (
1775
1767
iter:: once ( alias. name . span )
@@ -1814,7 +1806,7 @@ impl Spanned for TableFactor {
1814
1806
} => union_spans (
1815
1807
name. 0
1816
1808
. iter ( )
1817
- . map ( |i| i. span ( ) )
1809
+ . map ( |i| i. span )
1818
1810
. chain ( args. iter ( ) . map ( |i| i. span ( ) ) )
1819
1811
. chain ( alias. as_ref ( ) . map ( |alias| alias. span ( ) ) ) ,
1820
1812
) ,
@@ -1965,7 +1957,7 @@ impl Spanned for FunctionArgExpr {
1965
1957
match self {
1966
1958
FunctionArgExpr :: Expr ( expr) => expr. span ( ) ,
1967
1959
FunctionArgExpr :: QualifiedWildcard ( object_name) => {
1968
- union_spans ( object_name. 0 . iter ( ) . map ( |i| i. span ( ) ) )
1960
+ union_spans ( object_name. 0 . iter ( ) . map ( |i| i. span ) )
1969
1961
}
1970
1962
FunctionArgExpr :: Wildcard => Span :: empty ( ) ,
1971
1963
}
@@ -2176,7 +2168,7 @@ impl Spanned for TableObject {
2176
2168
fn span ( & self ) -> Span {
2177
2169
match self {
2178
2170
TableObject :: TableName ( ObjectName ( segments) ) => {
2179
- union_spans ( segments. iter ( ) . map ( |i| i. span ( ) ) )
2171
+ union_spans ( segments. iter ( ) . map ( |i| i. span ) )
2180
2172
}
2181
2173
TableObject :: TableFunction ( func) => func. span ( ) ,
2182
2174
}
0 commit comments