Skip to content

Commit 87123c5

Browse files
committed
refactor(cubesql): Fix op_ref warning
1 parent f01b7b9 commit 87123c5

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

rust/cubesql/cubesql/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ new_without_default = "allow"
119119
non_canonical_partial_ord_impl = "allow"
120120
nonminimal_bool = "allow"
121121
only_used_in_recursion = "allow"
122-
op_ref = "allow"
123122
option_as_ref_deref = "allow"
124123
partialeq_ne_impl = "allow"
125124
ptr_arg = "allow"

rust/cubesql/cubesql/src/compile/engine/df/wrapper.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,13 +1322,13 @@ impl CubeScanWrapperNode {
13221322
let aliased_column = aggr_expr
13231323
.iter()
13241324
.find_position(|e| {
1325-
expr_name(e, &schema).map(|n| &n == &col_name).unwrap_or(false)
1325+
expr_name(e, &schema).map(|n| n == col_name).unwrap_or(false)
13261326
})
13271327
.map(|(i, _)| aggregate[i].clone()).or_else(|| {
13281328
projection_expr
13291329
.iter()
13301330
.find_position(|e| {
1331-
expr_name(e, &schema).map(|n| &n == &col_name).unwrap_or(false)
1331+
expr_name(e, &schema).map(|n| n == col_name).unwrap_or(false)
13321332
})
13331333
.map(|(i, _)| {
13341334
projection[i].clone()
@@ -1337,7 +1337,7 @@ impl CubeScanWrapperNode {
13371337
flat_group_expr
13381338
.iter()
13391339
.find_position(|e| {
1340-
expr_name(e, &schema).map(|n| &n == &col_name).unwrap_or(false)
1340+
expr_name(e, &schema).map(|n| n == col_name).unwrap_or(false)
13411341
})
13421342
.map(|(i, _)| group_by[i].clone())
13431343
}).ok_or_else(|| {

rust/cubesql/cubesql/src/compile/engine/udf/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ pub fn create_convert_tz_udf() -> ScalarUDF {
815815
}
816816

817817
if let Some(tz) = input_tz {
818-
if tz != &"UTC" {
818+
if tz != "UTC" {
819819
return Err(DataFusionError::NotImplemented(format!(
820820
"convert_tz does not non UTC timezone as input, actual {}",
821821
tz

rust/cubesql/cubesql/src/compile/rewrite/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ impl LogicalPlanData {
691691
{
692692
{
693693
let column_name = expr_column_name(&expr, &None);
694-
let equal = name == &column_name;
694+
let equal = name == column_name;
695695
let _ = member_names_to_expr
696696
.cached_lookups
697697
.try_insert(column_name, index);
@@ -702,7 +702,7 @@ impl LogicalPlanData {
702702
}
703703
{
704704
let column_name = expr_column_name_with_relation(&expr, &mut relation);
705-
let equal = name == &column_name;
705+
let equal = name == column_name;
706706
let _ = member_names_to_expr
707707
.cached_lookups
708708
.try_insert(column_name, index);

rust/cubesql/cubesql/src/sql/postgres/writer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl ToProtocolValue for TimestampValue {
6464

6565
match self.tz_ref() {
6666
None => as_str.to_text(buf),
67-
Some(_) => (as_str + &"+00").to_text(buf),
67+
Some(_) => (as_str + "+00").to_text(buf),
6868
}
6969
}
7070

0 commit comments

Comments
 (0)