Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bump toolchain to 2022-06-09 #3112

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2022-05-24
nightly-2022-06-09
6 changes: 2 additions & 4 deletions src/connector/src/kinesis/source/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,11 @@ impl KinesisSplitReader {
async fn get_records(
&mut self,
) -> core::result::Result<GetRecordsOutput, SdkError<GetRecordsError>> {
let resp = self
.client
self.client
.get_records()
.set_shard_iterator(self.shard_iter.take())
.send()
.await;
resp
.await
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/expr/src/vector_op/agg/general_sorted_grouper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl EqGroups {
use std::collections::BinaryHeap;
let mut heap = BinaryHeap::new();
for (ci, column) in columns.iter().enumerate() {
if let Some(ri) = column.starting_indices().get(0) {
if let Some(ri) = column.starting_indices().first() {
heap.push(Reverse((ri, ci, 0)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/expr/src/vector_op/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::Result;

#[inline(always)]
pub fn ascii(s: &str) -> Result<i32> {
Ok(s.as_bytes().get(0).map(|x| *x as i32).unwrap_or(0))
Ok(s.as_bytes().first().map(|x| *x as i32).unwrap_or(0))
}

#[cfg(test)]
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/binder/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl Binder {
if return_type.is_numeric() {
return Ok(expr);
}
return Err(ErrorCode::InvalidInputSyntax(format!("+ {:?}", return_type)).into());
Err(ErrorCode::InvalidInputSyntax(format!("+ {:?}", return_type)).into())
}

pub(super) fn bind_trim(
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/expr/function_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl std::fmt::Debug for FunctionCall {
ExprType::Cast => {
assert_eq!(self.inputs.len(), 1);
self.inputs[0].fmt(f)?;
return write!(f, "::{:?}", self.return_type);
write!(f, "::{:?}", self.return_type)
}
ExprType::Add => debug_binary_op(f, "+", &self.inputs),
ExprType::Subtract => debug_binary_op(f, "-", &self.inputs),
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/scheduler/distributed/stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ impl StageRunner {
let children = execution_plan_node
.children
.iter()
.map(|e| self.convert_plan_node(&*e, task_id))
.map(|e| self.convert_plan_node(e, task_id))
.collect();

PlanNodeProst {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/scheduler/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl LocalQueryExecution {
let children = execution_plan_node
.children
.iter()
.map(|e| self.convert_plan_node(&*e))
.map(|e| self.convert_plan_node(e))
.collect::<Result<Vec<PlanNodeProst>>>()?;

Ok(PlanNodeProst {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/test_runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,12 @@ fn check_err(ctx: &str, expected_err: &Option<String>, actual_err: &Option<Strin
if expected_err == actual_err {
Ok(())
} else {
return Err(anyhow!(
Err(anyhow!(
"Expected {context} error: {}\n Actual {context} error: {}",
expected_err,
actual_err,
context = ctx
));
))
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/meta/src/barrier/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ where
.expect("Retry until recovery success.");
debug!("recovery success");

return (
(
new_epoch,
self.fragment_manager.all_chain_actor_ids().await,
responses
.into_iter()
.flat_map(|r| r.create_mview_progress)
.collect(),
);
)
}

/// Sync all sources in compute nodes, the local source manager in compute nodes may be dirty
Expand Down
4 changes: 2 additions & 2 deletions src/prost/helpers/src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ pub fn implement(field: &Field) -> TokenStream2 {
}
}

return quote! {
quote! {
#[inline(always)]
pub fn #getter_fn_name(&self) -> &#ty {
&self.#field_name
}
};
}
}
2 changes: 1 addition & 1 deletion src/sqlparser/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ impl Parser {
let all = self.parse_keyword(Keyword::ALL);
let distinct = self.parse_keyword(Keyword::DISTINCT);
if all && distinct {
return parser_err!("Cannot specify both ALL and DISTINCT".to_string());
parser_err!("Cannot specify both ALL and DISTINCT".to_string())
} else {
Ok(distinct)
}
Expand Down
5 changes: 2 additions & 3 deletions src/storage/src/hummock/compactor_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ mod tests {
..Default::default()
});
let sstable_store = mock_sstable_store();
let storage = HummockStorage::with_default_stats(
HummockStorage::with_default_stats(
options.clone(),
sstable_store,
hummock_meta_client.clone(),
Arc::new(StateStoreMetrics::unused()),
)
.await
.unwrap();
storage
.unwrap()
}

#[tokio::test]
Expand Down
3 changes: 1 addition & 2 deletions src/storage/src/hummock/iterator/forward_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ impl UserIterator {
// Handle multi-version
self.last_key.clear();
// Handle range scan when key > end_key
let res = self.next().await;
res
self.next().await
}

/// Indicates whether the iterator can be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ mod tests {
.map(|(ord, idx)| OrderPair::new(idx, ord))
.collect::<Vec<_>>();
let sort_key_serializer = OrderedArraysSerializer::new(order_pairs);
let managed_state = ManagedStringAggState::new(
ManagedStringAggState::new(
keyspace.clone(),
row_count,
sort_key_indices,
Expand All @@ -300,8 +300,7 @@ mod tests {
sort_key_serializer,
)
.await
.unwrap();
managed_state
.unwrap()
}

#[tokio::test]
Expand Down