Remove Box<> from SQLOrderByExpr

It was probably copied from somewhere else when most types were variants
in ASTNode, and needed Box<> to prevent recursion in the ASTNode definition.
This commit is contained in:
Nickolay Ponomarev 2019-01-31 15:10:52 +03:00
parent 9967031cba
commit 3619e89e9c
3 changed files with 7 additions and 13 deletions

View file

@ -242,15 +242,15 @@ fn parse_select_order_by() {
assert_eq!(
Some(vec![
SQLOrderByExpr {
expr: Box::new(ASTNode::SQLIdentifier("lname".to_string())),
expr: ASTNode::SQLIdentifier("lname".to_string()),
asc: Some(true),
},
SQLOrderByExpr {
expr: Box::new(ASTNode::SQLIdentifier("fname".to_string())),
expr: ASTNode::SQLIdentifier("fname".to_string()),
asc: Some(false),
},
SQLOrderByExpr {
expr: Box::new(ASTNode::SQLIdentifier("id".to_string())),
expr: ASTNode::SQLIdentifier("id".to_string()),
asc: None,
},
]),
@ -277,11 +277,11 @@ fn parse_select_order_by_limit() {
assert_eq!(
Some(vec![
SQLOrderByExpr {
expr: Box::new(ASTNode::SQLIdentifier("lname".to_string())),
expr: ASTNode::SQLIdentifier("lname".to_string()),
asc: Some(true),
},
SQLOrderByExpr {
expr: Box::new(ASTNode::SQLIdentifier("fname".to_string())),
expr: ASTNode::SQLIdentifier("fname".to_string()),
asc: Some(false),
},
]),