From 323046e9538f320bec876537105ba9e4cd3acf17 Mon Sep 17 00:00:00 2001 From: Denis Smirnov <sd@picodata.io> Date: Fri, 25 Mar 2022 11:15:18 +0700 Subject: [PATCH] feat: use a new ci image with rustfmt 1.4.38 --- .gitlab-ci.yml | 2 +- src/ir/expression.rs | 4 ++-- src/ir/operator.rs | 2 +- src/ir/value.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a3e578ec4..e53593a0b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ cache: default: tags: - picodata - image: registry.gitlab.com/picodata/dockers/brod-builder:0.3 + image: registry.gitlab.com/picodata/dockers/brod-builder:0.7 build: stage: build diff --git a/src/ir/expression.rs b/src/ir/expression.rs index 0022e87f59..a72c865751 100644 --- a/src/ir/expression.rs +++ b/src/ir/expression.rs @@ -366,7 +366,7 @@ impl Plan { vec![*target_idx] } else { // Reference in union tuple points to **both** left and right children. - targets.iter().copied().collect() + targets.to_vec() }; // Add new references and aliases to arena (if we need them). let r_id = self.nodes.add_ref(None, Some(new_targets), pos); @@ -404,7 +404,7 @@ impl Plan { let mut result: Vec<usize> = Vec::new(); let all_found = col_names.iter().all(|col| { map.get(*col).map_or(false, |pos| { - let new_targets: Vec<usize> = targets.iter().copied().collect(); + let new_targets: Vec<usize> = targets.to_vec(); // Add new references and aliases to arena (if we need them). let r_id = self.nodes.add_ref(None, Some(new_targets), *pos); if need_aliases { diff --git a/src/ir/operator.rs b/src/ir/operator.rs index 4ad8b7e84a..a016a794fd 100644 --- a/src/ir/operator.rs +++ b/src/ir/operator.rs @@ -273,7 +273,7 @@ impl Relational { match self { Relational::ScanRelation { alias, relation, .. - } => Ok(alias.as_deref().or_else(|| Some(relation.as_str()))), + } => Ok(alias.as_deref().or(Some(relation.as_str()))), Relational::ScanSubQuery { alias, .. } => Ok(alias.as_deref()), Relational::Projection { .. } | Relational::Selection { .. } diff --git a/src/ir/value.rs b/src/ir/value.rs index c1c6f2a8b6..ce525ae981 100644 --- a/src/ir/value.rs +++ b/src/ir/value.rs @@ -70,7 +70,7 @@ impl Value { /// # Errors /// Returns `QueryPlannerError` when a string is not a number. pub fn number_from_str(f: &str) -> Result<Self, QueryPlannerError> { - if let Ok(d) = d128::from_str(&f.to_string()) { + if let Ok(d) = d128::from_str(f) { return Ok(Value::Number(d)); } Err(QueryPlannerError::InvalidNumber) -- GitLab