@@ -27,13 +27,13 @@ use super::{
2727 FunctionArg , FunctionArgExpr , FunctionArgumentClause , FunctionArgumentList , FunctionArguments ,
2828 GroupByExpr , HavingBound , IlikeSelectItem , Insert , Interpolate , InterpolateExpr , Join ,
2929 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 ,
3737} ;
3838
3939/// Given an iterator of spans, return the [Span::union] of all spans.
@@ -1385,7 +1385,7 @@ impl Spanned for Expr {
13851385 . union_opt ( & overlay_for. as_ref ( ) . map ( |i| i. span ( ) ) ) ,
13861386 Expr :: Collate { expr, collation } => expr
13871387 . span ( )
1388- . union ( & union_spans ( collation. 0 . iter ( ) . map ( |i| i. span ( ) ) ) ) ,
1388+ . union ( & union_spans ( collation. 0 . iter ( ) . map ( |i| i. span ) ) ) ,
13891389 Expr :: Nested ( expr) => expr. span ( ) ,
13901390 Expr :: Value ( value) => value. span ( ) ,
13911391 Expr :: TypedString { .. } => Span :: empty ( ) ,
@@ -1489,7 +1489,7 @@ impl Spanned for Expr {
14891489 object_name
14901490 . 0
14911491 . iter ( )
1492- . map ( |i| i. span ( ) )
1492+ . map ( |i| i. span )
14931493 . chain ( iter:: once ( token. 0 . span ) ) ,
14941494 ) ,
14951495 Expr :: OuterJoin ( expr) => expr. span ( ) ,
@@ -1534,15 +1534,7 @@ impl Spanned for ObjectName {
15341534 fn span ( & self ) -> Span {
15351535 let ObjectName ( segments) = self ;
15361536
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 ) )
15461538 }
15471539}
15481540
@@ -1573,7 +1565,7 @@ impl Spanned for Function {
15731565 union_spans (
15741566 name. 0
15751567 . iter ( )
1576- . map ( |i| i. span ( ) )
1568+ . map ( |i| i. span )
15771569 . chain ( iter:: once ( args. span ( ) ) )
15781570 . chain ( iter:: once ( parameters. span ( ) ) )
15791571 . chain ( filter. iter ( ) . map ( |i| i. span ( ) ) )
@@ -1659,7 +1651,7 @@ impl Spanned for SelectItem {
16591651 object_name
16601652 . 0
16611653 . iter ( )
1662- . map ( |i| i. span ( ) )
1654+ . map ( |i| i. span )
16631655 . chain ( iter:: once ( wildcard_additional_options. span ( ) ) ) ,
16641656 ) ,
16651657 SelectItem :: Wildcard ( wildcard_additional_options) => wildcard_additional_options. span ( ) ,
@@ -1769,7 +1761,7 @@ impl Spanned for TableFactor {
17691761 } => union_spans (
17701762 name. 0
17711763 . iter ( )
1772- . map ( |i| i. span ( ) )
1764+ . map ( |i| i. span )
17731765 . chain ( alias. as_ref ( ) . map ( |alias| {
17741766 union_spans (
17751767 iter:: once ( alias. name . span )
@@ -1814,7 +1806,7 @@ impl Spanned for TableFactor {
18141806 } => union_spans (
18151807 name. 0
18161808 . iter ( )
1817- . map ( |i| i. span ( ) )
1809+ . map ( |i| i. span )
18181810 . chain ( args. iter ( ) . map ( |i| i. span ( ) ) )
18191811 . chain ( alias. as_ref ( ) . map ( |alias| alias. span ( ) ) ) ,
18201812 ) ,
@@ -1965,7 +1957,7 @@ impl Spanned for FunctionArgExpr {
19651957 match self {
19661958 FunctionArgExpr :: Expr ( expr) => expr. span ( ) ,
19671959 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 ) )
19691961 }
19701962 FunctionArgExpr :: Wildcard => Span :: empty ( ) ,
19711963 }
@@ -2176,7 +2168,7 @@ impl Spanned for TableObject {
21762168 fn span ( & self ) -> Span {
21772169 match self {
21782170 TableObject :: TableName ( ObjectName ( segments) ) => {
2179- union_spans ( segments. iter ( ) . map ( |i| i. span ( ) ) )
2171+ union_spans ( segments. iter ( ) . map ( |i| i. span ) )
21802172 }
21812173 TableObject :: TableFunction ( func) => func. span ( ) ,
21822174 }
0 commit comments