Skip to content

Commit

Permalink
Fix new clippy warnings in 1.84 and update toolchain for CI (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde authored Jan 24, 2025
1 parent 9c85d32 commit 96a09de
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ jobs:
distribution: 'temurin'
java-version: '11'
- name: Install Rust
uses: dtolnay/rust-toolchain@1.83
uses: dtolnay/rust-toolchain@master
with:
components: clippy, rustfmt
toolchain: 1.84
- name: Check Formatting
run: cargo fmt -- --check
- uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion crates/arroyo-api/src/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use crate::types::public::LogLevel;
use crate::{queries::api_queries, to_micros, types::public, AuthData};
use cornucopia_async::DatabaseSource;

pub(crate) async fn create_job<'a>(
pub(crate) async fn create_job(
pipeline_name: &str,
pipeline_id: i64,
checkpoint_interval: Duration,
Expand Down
3 changes: 3 additions & 0 deletions crates/arroyo-api/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust-clippy/issues/12908
#![allow(clippy::needless_lifetimes)]

use axum::response::IntoResponse;
use axum::Json;
use cornucopia_async::DatabaseSource;
Expand Down
4 changes: 2 additions & 2 deletions crates/arroyo-api/src/pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ use arroyo_types::to_millis;
use cornucopia_async::{Database, DatabaseSource};
use petgraph::prelude::EdgeRef;

async fn compile_sql<'a>(
async fn compile_sql(
query: String,
local_udfs: &Vec<Udf>,
parallelism: usize,
Expand Down Expand Up @@ -291,7 +291,7 @@ async fn register_schemas(compiled_sql: &mut CompiledSql) -> anyhow::Result<()>
}

#[allow(clippy::too_many_arguments)]
pub(crate) async fn create_pipeline_int<'a>(
pub(crate) async fn create_pipeline_int(
name: String,
query: String,
udfs: Vec<Udf>,
Expand Down
2 changes: 2 additions & 0 deletions crates/arroyo-controller/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#![allow(clippy::new_without_default)]
// TODO: factor out complex types
#![allow(clippy::type_complexity)]
// https://github.com/rust-lang/rust-clippy/issues/12908
#![allow(clippy::needless_lifetimes)]

use anyhow::Result;
use arroyo_rpc::config;
Expand Down
6 changes: 3 additions & 3 deletions crates/arroyo-server-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ struct AdminState {
name: String,
}

async fn root<'a>(State(state): State<Arc<AdminState>>) -> String {
async fn root(State(state): State<Arc<AdminState>>) -> String {
format!("{}\n", state.name)
}

async fn status<'a>() -> String {
async fn status() -> String {
"ok".to_string()
}

Expand Down Expand Up @@ -244,7 +244,7 @@ async fn config_route() -> Result<String, StatusCode> {
Ok(toml::to_string(&*config()).unwrap())
}

async fn details<'a>(State(state): State<Arc<AdminState>>) -> String {
async fn details(State(state): State<Arc<AdminState>>) -> String {
serde_json::to_string_pretty(&json!({
"service": state.name,
"git_sha": GIT_SHA,
Expand Down

0 comments on commit 96a09de

Please sign in to comment.