Skip to content

Commit

Permalink
Update to Rust 1.81.0, fix clippy suggestions (#610)
Browse files Browse the repository at this point in the history
<!-- The PR description should answer 2 (maybe 3) important questions:
-->

### What

Upgrade to Rust 1.81.0, fix clippy lint suggestions.

### How

Update `rust-toolchain.yaml`
  • Loading branch information
danieljharvey authored Sep 18, 2024
1 parent 449c8f9 commit 5fea619
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 37 deletions.
15 changes: 6 additions & 9 deletions crates/query-engine/execution/src/mutation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ pub async fn execute(
.await;
let mut connection = acquisition_timer
.complete_with(connection_result)
.map_err(|err| {
.inspect_err(|_err| {
metrics.error_metrics.record_connection_acquisition_error();
err
})?;

let query_timer = metrics.time_query_execution();
Expand Down Expand Up @@ -195,13 +194,11 @@ pub async fn explain(
internal.visibility = "user",
))
.await;
let mut connection =
acquisition_timer
.complete_with(connection_result)
.map_err(|err| {
metrics.error_metrics.record_connection_acquisition_error();
err
})?;
let mut connection = acquisition_timer
.complete_with(connection_result)
.inspect_err(|_err| {
metrics.error_metrics.record_connection_acquisition_error();
})?;

tracing::info!(
generated_sql = query_sql.sql,
Expand Down
15 changes: 6 additions & 9 deletions crates/query-engine/execution/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ pub async fn execute(
.await;
let mut connection = acquisition_timer
.complete_with(connection_result)
.map_err(|err| {
.inspect_err(|_err| {
metrics.error_metrics.record_connection_acquisition_error();
err
})?;

let query_timer = metrics.time_query_execution();
Expand Down Expand Up @@ -83,13 +82,11 @@ pub async fn explain(
internal.visibility = "user",
))
.await;
let mut connection =
acquisition_timer
.complete_with(connection_result)
.map_err(|err| {
metrics.error_metrics.record_connection_acquisition_error();
err
})?;
let mut connection = acquisition_timer
.complete_with(connection_result)
.inspect_err(|_err| {
metrics.error_metrics.record_connection_acquisition_error();
})?;

for statement in plan.pre {
execute_statement(&mut connection, &statement).await?;
Expand Down
29 changes: 12 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};

rust-overlay = {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.80.1"
channel = "1.81.0"
profile = "default" # see https://rust-lang.github.io/rustup/concepts/profiles.html
components = ["rust-analyzer", "rust-src"] # see https://rust-lang.github.io/rustup/concepts/components.html

0 comments on commit 5fea619

Please sign in to comment.