From d5677604e93c07a5392f4229af94a0b736eca382 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Fri, 6 Sep 2024 12:48:00 -0700 Subject: [PATCH] chore: update pinned rust version, clippy lints, remove some dead code (#1444) --- .cargo/config.toml | 2 - Cargo.toml | 10 +++ benches/Cargo.toml | 3 + benches/benches/fork_join.rs | 2 +- benches/benches/micro_ops.rs | 1 - benches/benches/reachability.rs | 1 - hydro_deploy/core/Cargo.toml | 4 + hydro_deploy/core/src/deployment.rs | 6 +- hydro_deploy/core/src/gcp.rs | 5 +- .../core/src/hydroflow_crate/build.rs | 2 +- .../core/src/hydroflow_crate/service.rs | 2 +- hydro_deploy/core/src/lib.rs | 2 - hydro_deploy/core/src/ssh.rs | 2 +- hydro_deploy/hydro_cli/Cargo.toml | 3 + hydro_deploy/hydro_cli/src/lib.rs | 21 ++--- hydro_deploy/hydro_cli_examples/Cargo.toml | 3 + .../hydroflow_deploy_integration/Cargo.toml | 3 + .../hydroflow_deploy_integration/src/lib.rs | 8 +- hydro_deploy/hydroflow_plus_deploy/Cargo.toml | 3 + .../hydroflow_plus_deploy/src/deploy.rs | 6 +- hydro_deploy/hydroflow_plus_deploy/src/lib.rs | 2 +- hydroflow/Cargo.toml | 3 + hydroflow/examples/deadlock_detector/peer.rs | 2 +- hydroflow/examples/example_syntax_empty.rs | 2 +- hydroflow/examples/kvs_bench/protocol/mod.rs | 2 +- hydroflow/examples/three_clique/main.rs | 2 +- hydroflow/src/compiled/pull/cross_join.rs | 2 +- hydroflow/src/compiled/pull/mod.rs | 2 +- hydroflow/src/lib.rs | 5 -- hydroflow/src/props/mod.rs | 33 -------- hydroflow/src/props/wrap.rs | 78 ------------------- hydroflow/src/scheduled/graph.rs | 9 +-- hydroflow/src/scheduled/graph_ext.rs | 3 +- hydroflow/src/scheduled/handoff/tee.rs | 1 - hydroflow/src/scheduled/input.rs | 2 +- hydroflow/src/scheduled/net/mod.rs | 2 +- hydroflow/src/scheduled/port.rs | 6 +- hydroflow/src/scheduled/query.rs | 2 +- hydroflow/src/util/deploy.rs | 2 +- hydroflow/src/util/tcp.rs | 1 + hydroflow/tests/groupby.rs | 2 +- hydroflow/tests/scheduled_test.rs | 20 ++--- hydroflow/tests/surface_codegen.rs | 2 +- hydroflow/tests/surface_stratum.rs | 2 +- hydroflow_datalog/Cargo.toml | 3 + hydroflow_datalog_core/Cargo.toml | 3 + hydroflow_datalog_core/src/grammar.rs | 5 +- hydroflow_datalog_core/src/join_plan.rs | 2 +- hydroflow_datalog_core/src/lib.rs | 2 +- ...egations_and_comments@datalog_program.snap | 12 +++ ...tions_fold_keyed_expr@datalog_program.snap | 8 ++ ...ore__tests__anti_join@datalog_program.snap | 32 ++++++++ ...e__tests__collect_vec@datalog_program.snap | 20 +++++ ..._core__tests__detuple@datalog_program.snap | 12 +++ ...ts__detuple_then_flat@datalog_program.snap | 12 +++ ...core__tests__expr_lhs@datalog_program.snap | 48 ++++++++++++ ...tests__expr_predicate@datalog_program.snap | 32 ++++++++ ...ts__flat_then_detuple@datalog_program.snap | 12 +++ ..._core__tests__flatten@datalog_program.snap | 8 ++ ...og_core__tests__index@datalog_program.snap | 16 ++++ ...ests__join_with_other@datalog_program.snap | 20 +++++ ...tests__join_with_self@datalog_program.snap | 20 +++++ ...__local_constraints@datalog_program-2.snap | 8 ++ ...ts__local_constraints@datalog_program.snap | 8 ++ ...alog_core__tests__max@datalog_program.snap | 8 ++ ..._core__tests__max_all@datalog_program.snap | 8 ++ ...ests__minimal_program@datalog_program.snap | 8 ++ ..._tests__multi_detuple@datalog_program.snap | 16 ++++ ...multiple_contributors@datalog_program.snap | 16 ++++ ...s__non_copy_but_clone@datalog_program.snap | 8 ++ ..._core__tests__persist@datalog_program.snap | 52 +++++++++++++ ...s__persist_uniqueness@datalog_program.snap | 12 +++ ...__tests__send_to_node@datalog_program.snap | 12 +++ ..._tests__simple_filter@datalog_program.snap | 8 ++ ...single_column_program@datalog_program.snap | 20 +++++ ...s__transitive_closure@datalog_program.snap | 28 +++++++ ..._triple_relation_join@datalog_program.snap | 32 ++++++++ ...ests__wildcard_fields@datalog_program.snap | 20 +++++ ...__wildcard_join_count@datalog_program.snap | 40 ++++++++++ hydroflow_lang/Cargo.toml | 3 + hydroflow_lang/src/graph/di_mul_graph.rs | 2 +- hydroflow_lang/src/graph/graph_write.rs | 2 +- hydroflow_lang/src/graph/hydroflow_graph.rs | 34 ++++---- hydroflow_lang/src/graph/mod.rs | 4 +- hydroflow_lang/src/graph/ops/map.rs | 1 + hydroflow_lang/src/graph/ops/mod.rs | 10 ++- hydroflow_lang/src/graph/ops/py_udf.rs | 2 +- hydroflow_lang/src/graph/ops/source_stdin.rs | 2 +- hydroflow_lang/src/lib.rs | 2 - hydroflow_lang/src/parse.rs | 4 +- hydroflow_lang/src/union_find.rs | 1 - hydroflow_macro/Cargo.toml | 3 + hydroflow_macro/src/lib.rs | 7 +- hydroflow_plus/Cargo.toml | 3 + hydroflow_plus/src/builder/mod.rs | 5 +- hydroflow_plus/src/properties.rs | 2 +- hydroflow_plus_test/Cargo.toml | 3 + hydroflow_plus_test/src/cluster/paxos.rs | 23 ++++-- hydroflow_plus_test_local/Cargo.toml | 3 + hydroflow_plus_test_local_macro/Cargo.toml | 3 + lattices/Cargo.toml | 3 + lattices/src/collections.rs | 4 - lattices/src/semiring_application.rs | 4 - lattices/src/test.rs | 9 ++- lattices/src/union_find.rs | 2 +- lattices/tests/macro.rs | 2 +- lattices_macro/Cargo.toml | 3 + multiplatform_test/Cargo.toml | 3 + multiplatform_test/README.md | 4 +- multiplatform_test/src/lib.rs | 1 - pusherator/Cargo.toml | 3 + relalg/Cargo.toml | 3 + relalg/src/codegen.rs | 4 +- relalg/src/lib.rs | 5 +- relalg/src/runtime.rs | 2 - rust-toolchain.toml | 2 +- stageleft/Cargo.toml | 3 + stageleft/src/lib.rs | 14 +++- stageleft/src/runtime_support.rs | 2 +- stageleft_macro/Cargo.toml | 3 + stageleft_test/Cargo.toml | 3 + stageleft_test/src/lib.rs | 2 +- stageleft_test/src/submodule.rs | 2 +- stageleft_test_macro/Cargo.toml | 3 + stageleft_tool/Cargo.toml | 3 + stageleft_tool/src/lib.rs | 2 +- topolotree/Cargo.toml | 3 + variadics/Cargo.toml | 3 + variadics/src/lib.rs | 5 +- website_playground/Cargo.toml | 3 + 130 files changed, 810 insertions(+), 261 deletions(-) delete mode 100644 hydroflow/src/props/mod.rs delete mode 100644 hydroflow/src/props/wrap.rs diff --git a/.cargo/config.toml b/.cargo/config.toml index 32a3fc10a4a..be883d3e2fd 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,6 @@ [build] rustflags = [ "-Zproc-macro-backtrace", - "-Wunused_qualifications", - "-Wclippy::upper_case_acronyms", # Flag to make build.rs scripts generate docs. Should only be used in this repository # internally, not by dependants. '--cfg=HYDROFLOW_GENERATE_DOCS', diff --git a/Cargo.toml b/Cargo.toml index 53af7d2e836..4c0713b657a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,3 +53,13 @@ debug-assertions = false [profile.release.package.website_playground] opt-level = "s" + +[workspace.lints.rust] +unused_qualifications = "warn" + +[workspace.lints.clippy] +allow_attributes = "warn" +allow_attributes_without_reason = "warn" +explicit_into_iter_loop = "warn" +let_and_return = "allow" +upper_case_acronyms = "warn" diff --git a/benches/Cargo.toml b/benches/Cargo.toml index e37a0825cb8..7b1dac67541 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -5,6 +5,9 @@ version = "0.0.0" edition = "2021" license = "Apache-2.0" +[lints] +workspace = true + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/benches/benches/fork_join.rs b/benches/benches/fork_join.rs index 62ca9b7b60d..a65171c5143 100644 --- a/benches/benches/fork_join.rs +++ b/benches/benches/fork_join.rs @@ -34,7 +34,7 @@ fn benchmark_hydroflow(c: &mut Criterion) { send1, send2, |_ctx, recv, send1, send2| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { if v % 2 == 0 { send1.give(Some(v)); } else { diff --git a/benches/benches/micro_ops.rs b/benches/benches/micro_ops.rs index ce32f2308e6..9f6d6c55711 100644 --- a/benches/benches/micro_ops.rs +++ b/benches/benches/micro_ops.rs @@ -185,7 +185,6 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let input0: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - #[allow(clippy::unnecessary_fold)] { hydroflow_syntax! { source_iter(black_box(input0)) -> fold::<'tick>(|| 0, |accum: &mut _, elem| { *accum += elem }) -> for_each(|x| { black_box(x); }); diff --git a/benches/benches/reachability.rs b/benches/benches/reachability.rs index 3537300baa7..57919ca8a28 100644 --- a/benches/benches/reachability.rs +++ b/benches/benches/reachability.rs @@ -289,7 +289,6 @@ fn benchmark_hydroflow(c: &mut Criterion) { }); } -#[allow(clippy::map_clone)] fn benchmark_hydroflow_surface_cheating(c: &mut Criterion) { c.bench_function("reachability/hydroflow/surface_cheating", |b| { b.iter_batched( diff --git a/hydro_deploy/core/Cargo.toml b/hydro_deploy/core/Cargo.toml index 94a858ef919..0c754f3c904 100644 --- a/hydro_deploy/core/Cargo.toml +++ b/hydro_deploy/core/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydro_deploy/" description = "Hydro Deploy" +[lints] +workspace = true + [dependencies] anyhow = { version = "1.0.82", features = [ "backtrace" ] } async-process = "2.0.0" @@ -34,3 +37,4 @@ tempfile = "3.0.0" tokio = { version = "1.29.0", features = [ "full" ] } tokio-stream = { version = "0.1.3", default-features = false } tokio-util = { version = "0.7.5", features = [ "compat", "io-util" ] } + diff --git a/hydro_deploy/core/src/deployment.rs b/hydro_deploy/core/src/deployment.rs index cbc00b58f22..6eba1b18e1e 100644 --- a/hydro_deploy/core/src/deployment.rs +++ b/hydro_deploy/core/src/deployment.rs @@ -45,12 +45,12 @@ impl Deployment { ret } - #[allow(non_snake_case)] + #[expect(non_snake_case, reason = "constructor-esque")] pub fn Localhost(&self) -> Arc { self.localhost_host.clone().unwrap() } - #[allow(non_snake_case)] + #[expect(non_snake_case, reason = "constructor-esque")] pub fn CustomService( &mut self, on: Arc, @@ -201,7 +201,6 @@ impl Deployment { /// Buildstructor methods. #[buildstructor::buildstructor] impl Deployment { - #[allow(clippy::too_many_arguments)] #[builder(entry = "GcpComputeEngineHost", exit = "add")] pub fn add_gcp_compute_engine_host( &mut self, @@ -227,7 +226,6 @@ impl Deployment { }) } - #[allow(clippy::too_many_arguments)] #[builder(entry = "AzureHost", exit = "add")] pub fn add_azure_host( &mut self, diff --git a/hydro_deploy/core/src/gcp.rs b/hydro_deploy/core/src/gcp.rs index 5007bbbdbc0..a60a14280d4 100644 --- a/hydro_deploy/core/src/gcp.rs +++ b/hydro_deploy/core/src/gcp.rs @@ -184,7 +184,10 @@ pub struct GcpComputeEngineHost { } impl GcpComputeEngineHost { - #[allow(clippy::too_many_arguments)] // TODO(mingwei) + #[expect( + clippy::too_many_arguments, + reason = "internal code called by builder elsewhere" + )] pub fn new( id: usize, project: impl Into, diff --git a/hydro_deploy/core/src/hydroflow_crate/build.rs b/hydro_deploy/core/src/hydroflow_crate/build.rs index 72e20f36722..61efa475a1a 100644 --- a/hydro_deploy/core/src/hydroflow_crate/build.rs +++ b/hydro_deploy/core/src/hydroflow_crate/build.rs @@ -35,7 +35,7 @@ pub struct BuildParams { } impl BuildParams { /// Creates a new `BuildParams` and canonicalizes the `src` path. - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments, reason = "internal code")] pub fn new( src: impl AsRef, bin: Option, diff --git a/hydro_deploy/core/src/hydroflow_crate/service.rs b/hydro_deploy/core/src/hydroflow_crate/service.rs index 08c73d5e03e..6089e0c8d33 100644 --- a/hydro_deploy/core/src/hydroflow_crate/service.rs +++ b/hydro_deploy/core/src/hydroflow_crate/service.rs @@ -47,7 +47,7 @@ pub struct HydroflowCrateService { } impl HydroflowCrateService { - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments, reason = "internal code")] pub fn new( id: usize, src: PathBuf, diff --git a/hydro_deploy/core/src/lib.rs b/hydro_deploy/core/src/lib.rs index c1cc1bbfb92..f118b25e472 100644 --- a/hydro_deploy/core/src/lib.rs +++ b/hydro_deploy/core/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::let_and_return)] - use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; diff --git a/hydro_deploy/core/src/ssh.rs b/hydro_deploy/core/src/ssh.rs index dd315f06fe1..def888a52b1 100644 --- a/hydro_deploy/core/src/ssh.rs +++ b/hydro_deploy/core/src/ssh.rs @@ -433,7 +433,7 @@ impl LaunchedHost for T { let port = addr.port(); tokio::spawn(async move { - #[allow(clippy::never_loop)] + #[expect(clippy::never_loop, reason = "tcp accept loop pattern")] while let Ok((mut local_stream, _)) = local_port.accept().await { let mut channel = session .channel_direct_tcpip(&internal_ip, port, None) diff --git a/hydro_deploy/hydro_cli/Cargo.toml b/hydro_deploy/hydro_cli/Cargo.toml index ed127a4f404..815fdb9f519 100644 --- a/hydro_deploy/hydro_cli/Cargo.toml +++ b/hydro_deploy/hydro_cli/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydro_cli/" description = "Hydro Deploy Command Line Interface" +[lints] +workspace = true + [lib] name = "hydro_cli" # "cdylib" is necessary to produce a shared library for Python to import from. diff --git a/hydro_deploy/hydro_cli/src/lib.rs b/hydro_deploy/hydro_cli/src/lib.rs index b9af3d7b806..2c1de84faff 100644 --- a/hydro_deploy/hydro_cli/src/lib.rs +++ b/hydro_deploy/hydro_cli/src/lib.rs @@ -1,5 +1,8 @@ -// TODO(mingwei): For pyo3 generated code. -#![allow(unused_qualifications, non_local_definitions)] +#![expect( + unused_qualifications, + non_local_definitions, + reason = "for pyo3 generated code" +)] use core::hydroflow_crate::ports::HydroflowSource; use std::cell::OnceCell; @@ -159,7 +162,7 @@ impl Deployment { } } - #[allow(non_snake_case)] + #[expect(non_snake_case, reason = "pymethods")] fn Localhost(&self, py: Python<'_>) -> PyResult> { let arc = self.underlying.blocking_read().Localhost(); @@ -173,7 +176,7 @@ impl Deployment { .into_py(py)) } - #[allow(non_snake_case, clippy::too_many_arguments)] + #[expect(non_snake_case, clippy::too_many_arguments, reason = "pymethods")] fn GcpComputeEngineHost( &self, py: Python<'_>, @@ -208,7 +211,7 @@ impl Deployment { .into_py(py)) } - #[allow(non_snake_case, clippy::too_many_arguments)] + #[expect(non_snake_case, clippy::too_many_arguments, reason = "pymethods")] fn AzureHost( &self, py: Python<'_>, @@ -233,7 +236,7 @@ impl Deployment { .into_py(py)) } - #[allow(non_snake_case)] + #[expect(non_snake_case, reason = "pymethods")] fn CustomService( &self, py: Python<'_>, @@ -257,7 +260,7 @@ impl Deployment { .into_py(py)) } - #[allow(non_snake_case, clippy::too_many_arguments)] + #[expect(non_snake_case, clippy::too_many_arguments, reason = "pymethods")] fn HydroflowCrate( &self, py: Python<'_>, @@ -725,7 +728,7 @@ impl ServerPort { pythonize(py, &self.underlying).unwrap() } - #[allow(clippy::wrong_self_convention)] + #[expect(clippy::wrong_self_convention, reason = "pymethods")] fn into_source<'p>(&self, py: Python<'p>) -> PyResult<&'p PyAny> { let realized = with_tokio_runtime(|| ServerOrBound::Server((&self.underlying).into())); @@ -738,7 +741,7 @@ impl ServerPort { }) } - #[allow(clippy::wrong_self_convention)] + #[expect(clippy::wrong_self_convention, reason = "pymethods")] fn into_sink<'p>(&self, py: Python<'p>) -> PyResult<&'p PyAny> { let realized = with_tokio_runtime(|| ServerOrBound::Server((&self.underlying).into())); diff --git a/hydro_deploy/hydro_cli_examples/Cargo.toml b/hydro_deploy/hydro_cli_examples/Cargo.toml index 88a88ecbb1e..09dc6d182e2 100644 --- a/hydro_deploy/hydro_cli_examples/Cargo.toml +++ b/hydro_deploy/hydro_cli_examples/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [[example]] name = "empty_program" diff --git a/hydro_deploy/hydroflow_deploy_integration/Cargo.toml b/hydro_deploy/hydroflow_deploy_integration/Cargo.toml index 87ae45c3260..37c954e8523 100644 --- a/hydro_deploy/hydroflow_deploy_integration/Cargo.toml +++ b/hydro_deploy/hydroflow_deploy_integration/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_deploy_integration/" description = "`hydro_deploy` integration for Hydroflow" +[lints] +workspace = true + [dependencies] async-recursion = "1.0.0" async-trait = "0.1.54" diff --git a/hydro_deploy/hydroflow_deploy_integration/src/lib.rs b/hydro_deploy/hydroflow_deploy_integration/src/lib.rs index 4cd1c75c398..78d127f49d9 100644 --- a/hydro_deploy/hydroflow_deploy_integration/src/lib.rs +++ b/hydro_deploy/hydroflow_deploy_integration/src/lib.rs @@ -25,15 +25,13 @@ use tokio_util::codec::{Framed, LengthDelimitedCodec}; pub type InitConfig = (HashMap, Option); #[cfg(not(unix))] -#[allow(dead_code)] -type UnixStream = (); +type UnixStream = std::convert::Infallible; #[cfg(not(unix))] -#[allow(dead_code)] -type UnixListener = (); +#[expect(dead_code, reason = "conditional compilation placeholder")] +type UnixListener = std::convert::Infallible; /// Describes how to connect to a service which is listening on some port. -#[allow(unreachable_code)] #[derive(Serialize, Deserialize, Clone, Debug)] pub enum ServerPort { UnixSocket(PathBuf), diff --git a/hydro_deploy/hydroflow_plus_deploy/Cargo.toml b/hydro_deploy/hydroflow_plus_deploy/Cargo.toml index 6f35b034f48..f17e9892980 100644 --- a/hydro_deploy/hydroflow_plus_deploy/Cargo.toml +++ b/hydro_deploy/hydroflow_plus_deploy/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_plus_deploy/" description = "Library for working with hydro_deploy and hydroflow_plus" +[lints] +workspace = true + [features] deploy = [ "hydro_deploy", "trybuild-internals-api", "toml", "prettyplease" ] stageleft_devel = [] diff --git a/hydro_deploy/hydroflow_plus_deploy/src/deploy.rs b/hydro_deploy/hydroflow_plus_deploy/src/deploy.rs index cad8a79249a..c9b5d029140 100644 --- a/hydro_deploy/hydroflow_plus_deploy/src/deploy.rs +++ b/hydro_deploy/hydroflow_plus_deploy/src/deploy.rs @@ -227,7 +227,7 @@ impl<'a> Deploy<'a> for HydroDeploy { pub trait DeployCrateWrapper { fn underlying(&self) -> Arc>; - #[allow(async_fn_in_trait)] + #[expect(async_fn_in_trait, reason = "no auto trait bounds needed")] async fn create_sender( &self, port: &str, @@ -246,12 +246,12 @@ pub trait DeployCrateWrapper { sender_port } - #[allow(async_fn_in_trait)] + #[expect(async_fn_in_trait, reason = "no auto trait bounds needed")] async fn stdout(&self) -> tokio::sync::mpsc::UnboundedReceiver { self.underlying().read().await.stdout() } - #[allow(async_fn_in_trait)] + #[expect(async_fn_in_trait, reason = "no auto trait bounds needed")] async fn stderr(&self) -> tokio::sync::mpsc::UnboundedReceiver { self.underlying().read().await.stderr() } diff --git a/hydro_deploy/hydroflow_plus_deploy/src/lib.rs b/hydro_deploy/hydroflow_plus_deploy/src/lib.rs index 0bc35fada43..9625f38f8db 100644 --- a/hydro_deploy/hydroflow_plus_deploy/src/lib.rs +++ b/hydro_deploy/hydroflow_plus_deploy/src/lib.rs @@ -8,7 +8,7 @@ pub(crate) mod trybuild; pub use runtime::*; -#[allow(unused)] +#[allow(clippy::allow_attributes, unused, reason = "stageleft")] pub(crate) mod deploy_runtime; #[cfg(feature = "deploy")] diff --git a/hydroflow/Cargo.toml b/hydroflow/Cargo.toml index 236d5ba6bac..3d4400e9deb 100644 --- a/hydroflow/Cargo.toml +++ b/hydroflow/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow/" description = "Hydro's low-level dataflow runtime and IR" +[lints] +workspace = true + [features] default = [ "macros", "nightly", "debugging" ] diff --git a/hydroflow/examples/deadlock_detector/peer.rs b/hydroflow/examples/deadlock_detector/peer.rs index 1402ebce45d..ef0416b725b 100644 --- a/hydroflow/examples/deadlock_detector/peer.rs +++ b/hydroflow/examples/deadlock_detector/peer.rs @@ -20,7 +20,7 @@ pub(crate) async fn run_detector(opts: Opts, peer_list: Vec) { let reader = tokio::io::BufReader::new(tokio::io::stdin()); let stdin_lines = LinesStream::new(reader.lines()); - #[allow(clippy::map_identity)] + #[expect(clippy::map_identity, reason = "helps type inference?")] let mut hf: Hydroflow = hydroflow_syntax! { // fetch peers from file, convert ip:port to a SocketAddr, and tee peers = source_iter(peer_list) diff --git a/hydroflow/examples/example_syntax_empty.rs b/hydroflow/examples/example_syntax_empty.rs index 71068674cb6..13010ddc39d 100644 --- a/hydroflow/examples/example_syntax_empty.rs +++ b/hydroflow/examples/example_syntax_empty.rs @@ -1,4 +1,4 @@ -#![allow(unused_mut, unused_variables)] +#![expect(unused_mut, unused_variables, reason = "example code")] use hydroflow::hydroflow_syntax; diff --git a/hydroflow/examples/kvs_bench/protocol/mod.rs b/hydroflow/examples/kvs_bench/protocol/mod.rs index 6bbd083fb27..ee4b2e0bafa 100644 --- a/hydroflow/examples/kvs_bench/protocol/mod.rs +++ b/hydroflow/examples/kvs_bench/protocol/mod.rs @@ -38,7 +38,7 @@ pub enum KvsResponse { _PutResponse { key: u64, }, - #[allow(dead_code)] + #[expect(dead_code, reason = "benchmark discards responses")] GetResponse { key: u64, reg: MyLastWriteWins, diff --git a/hydroflow/examples/three_clique/main.rs b/hydroflow/examples/three_clique/main.rs index 7c38d89616f..deacc379d19 100644 --- a/hydroflow/examples/three_clique/main.rs +++ b/hydroflow/examples/three_clique/main.rs @@ -18,7 +18,7 @@ pub fn main() { // An edge in the input data = a pair of `usize` vertex IDs. let (edges_send, edges_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - #[allow(clippy::map_identity)] + #[expect(clippy::map_identity, reason = "code symmetry")] let mut df = hydroflow_syntax! { edges = source_stream(edges_recv) -> tee(); diff --git a/hydroflow/src/compiled/pull/cross_join.rs b/hydroflow/src/compiled/pull/cross_join.rs index bf6eea4d18e..90f743d9bc9 100644 --- a/hydroflow/src/compiled/pull/cross_join.rs +++ b/hydroflow/src/compiled/pull/cross_join.rs @@ -61,7 +61,7 @@ where self.state.draw_from_left = !self.state.draw_from_left; // try to fetch from the specified side - #[allow(clippy::collapsible_else_if)] + #[expect(clippy::collapsible_else_if, reason = "code symmetry")] if self.state.draw_from_left { if let Some(l) = self.lhs.next() { self.state.draw_from_left = true; diff --git a/hydroflow/src/compiled/pull/mod.rs b/hydroflow/src/compiled/pull/mod.rs index be85b359a8b..2872fb8ab0c 100644 --- a/hydroflow/src/compiled/pull/mod.rs +++ b/hydroflow/src/compiled/pull/mod.rs @@ -1,5 +1,5 @@ //! Pull-based operator helpers, i.e. [`Iterator`] helpers. -#![allow(missing_docs)] // TODO(mingwei) +#![allow(missing_docs, reason = "// TODO(mingwei)")] mod cross_join; pub use cross_join::*; diff --git a/hydroflow/src/lib.rs b/hydroflow/src/lib.rs index 2dc75426a9e..2970b129f08 100644 --- a/hydroflow/src/lib.rs +++ b/hydroflow/src/lib.rs @@ -1,8 +1,4 @@ #![cfg_attr(feature = "nightly", feature(never_type))] -#![allow(type_alias_bounds)] -#![allow(clippy::let_and_return)] -#![allow(clippy::iter_with_drain)] -#![allow(clippy::explicit_auto_deref)] #![warn(missing_docs)] //! Hydroflow is a low-level dataflow-based runtime system for the [Hydro Project](https://hydro.run/). @@ -22,7 +18,6 @@ //! For more examples, check out the [`examples` folder on Github](https://github.com/hydro-project/hydroflow/tree/main/hydroflow/examples). pub mod compiled; -pub mod props; pub mod scheduled; pub mod util; diff --git a/hydroflow/src/props/mod.rs b/hydroflow/src/props/mod.rs deleted file mode 100644 index 53065aee709..00000000000 --- a/hydroflow/src/props/mod.rs +++ /dev/null @@ -1,33 +0,0 @@ -//! Hydroflow lattice and flow properties, very WIP. -#![allow(missing_docs)] - -pub mod wrap; - -pub trait Spec {} - -pub trait Props { - type Monotonicity: PropMonotonicity; - type Duplicates: PropDuplicates; -} -impl Props for (Monotonicity, Duplicates) -where - Monotonicity: PropMonotonicity, - Duplicates: PropDuplicates, -{ - type Monotonicity = Monotonicity; - type Duplicates = Duplicates; -} - -pub trait PropMonotonicity {} -pub struct NonMonotonic; -impl PropMonotonicity for NonMonotonic {} -pub struct Monotonic; -impl PropMonotonicity for Monotonic {} -pub struct Consecutive; -impl PropMonotonicity for Consecutive {} - -pub trait PropDuplicates {} -pub struct Duplicates; -impl PropDuplicates for Duplicates {} -pub struct NoDuplicates; -impl PropDuplicates for NoDuplicates {} diff --git a/hydroflow/src/props/wrap.rs b/hydroflow/src/props/wrap.rs deleted file mode 100644 index a3a78974296..00000000000 --- a/hydroflow/src/props/wrap.rs +++ /dev/null @@ -1,78 +0,0 @@ -use super::Props; - -pub trait PullSpec { - type Props: Props; -} - -pub trait PushSpec { - type Props; -} - -macro_rules! spec_impl { - ( - PullSpec for $($struct:ident::)* <$iname:ident $(,$gname:ident)*> - ) => { - impl<$iname $(,$gname)*> PullSpec for $($struct::)* <$iname $(,$gname)*> - where - $iname: PullSpec, - { - type Props = $iname::Props; - } - }; - ( - PushSpec for $($struct:ident::)* <$iname:ident $(,$gname:ident)*> - ) => { - impl<$iname $(,$gname)*> PushSpec for $($struct::)* <$iname $(,$gname)*> - where - $iname: PushSpec, - { - type Props = $iname::Props; - } - }; -} - -spec_impl!(PullSpec for std::iter::Cloned::); -spec_impl!(PullSpec for std::iter::Copied::); -spec_impl!(PullSpec for std::iter::Filter::); -spec_impl!(PullSpec for std::iter::FilterMap::); -spec_impl!(PullSpec for std::iter::Inspect::); -spec_impl!(PullSpec for std::iter::Map::); - -impl PullSpec for std::iter::FlatMap -where - I: Iterator + PullSpec, - U: IntoIterator, - F: FnMut(I::Item) -> U, -{ - type Props = I::Props; -} - -impl PullSpec for std::iter::Flatten -where - I: Iterator + PullSpec, - ::Item: IntoIterator, -{ - type Props = I::Props; -} - -spec_impl!(PushSpec for pusherator::filter_map::FilterMap::); -spec_impl!(PushSpec for pusherator::filter::Filter::); -spec_impl!(PushSpec for pusherator::flatten::Flatten::); -spec_impl!(PushSpec for pusherator::for_each::ForEach::); -spec_impl!(PushSpec for pusherator::map::Map::); - -impl PushSpec for pusherator::partition::Partition -where - Next1: PushSpec, - Next2: PushSpec, -{ - type Props = (Next1::Props, Next2::Props); -} - -impl PushSpec for pusherator::tee::Tee -where - Next1: PushSpec, - Next2: PushSpec, -{ - type Props = (Next1::Props, Next2::Props); -} diff --git a/hydroflow/src/scheduled/graph.rs b/hydroflow/src/scheduled/graph.rs index 10ab6a3375a..85d71d98bfe 100644 --- a/hydroflow/src/scheduled/graph.rs +++ b/hydroflow/src/scheduled/graph.rs @@ -615,8 +615,8 @@ impl<'a> Hydroflow<'a> { let sg_id = SubgraphId(self.subgraphs.len()); let (mut subgraph_preds, mut subgraph_succs) = Default::default(); - recv_ports.set_graph_meta(&mut *self.handoffs, &mut subgraph_preds, sg_id, true); - send_ports.set_graph_meta(&mut *self.handoffs, &mut subgraph_succs, sg_id, false); + recv_ports.set_graph_meta(&mut self.handoffs, &mut subgraph_preds, sg_id, true); + send_ports.set_graph_meta(&mut self.handoffs, &mut subgraph_succs, sg_id, false); let subgraph = move |context: &mut Context, handoffs: &mut Vec| { let recv = recv_ports.make_ctx(&*handoffs); @@ -828,7 +828,6 @@ impl<'a> Drop for Hydroflow<'a> { #[doc(hidden)] pub struct HandoffData { /// A friendly name for diagnostics. - #[allow(dead_code)] // TODO(mingwei): remove attr once used. pub(super) name: Cow<'static, str>, /// Crate-visible to crate for `handoff_list` internals. pub(super) handoff: Box, @@ -883,13 +882,13 @@ impl HandoffData { /// structure and scheduled state. pub(super) struct SubgraphData<'a> { /// A friendly name for diagnostics. - #[allow(dead_code)] // TODO(mingwei): remove attr once used. pub(super) name: Cow<'static, str>, /// This subgraph's stratum number. pub(super) stratum: usize, /// The actual execution code of the subgraph. subgraph: Box, - #[allow(dead_code)] + + #[expect(dead_code, reason = "may be useful in the future")] preds: Vec, succs: Vec, diff --git a/hydroflow/src/scheduled/graph_ext.rs b/hydroflow/src/scheduled/graph_ext.rs index 9c23494aecf..6f54413d832 100644 --- a/hydroflow/src/scheduled/graph_ext.rs +++ b/hydroflow/src/scheduled/graph_ext.rs @@ -1,5 +1,4 @@ //! Helper extensions for [`Hydroflow`]. -#![allow(missing_docs)] use core::task; use std::borrow::Cow; @@ -92,6 +91,7 @@ pub trait GraphExt { (send_port_1: W1, send_port_2: W2) ); + /// Adds a channel input which sends to the `send_port`. fn add_channel_input( &mut self, name: Name, @@ -114,6 +114,7 @@ pub trait GraphExt { T: 'static, W: 'static + Handoff + CanReceive; + /// Adds a subgraph which pulls from the async stream and sends to the `send_port`. fn add_input_from_stream( &mut self, name: Name, diff --git a/hydroflow/src/scheduled/handoff/tee.rs b/hydroflow/src/scheduled/handoff/tee.rs index c05db5fee20..b0b3fea705f 100644 --- a/hydroflow/src/scheduled/handoff/tee.rs +++ b/hydroflow/src/scheduled/handoff/tee.rs @@ -1,5 +1,4 @@ //! Module for teeing handoffs, not currently used much. -#![allow(missing_docs)] use std::any::Any; use std::cell::RefCell; diff --git a/hydroflow/src/scheduled/input.rs b/hydroflow/src/scheduled/input.rs index 49071847ccd..9439a29eda5 100644 --- a/hydroflow/src/scheduled/input.rs +++ b/hydroflow/src/scheduled/input.rs @@ -1,4 +1,4 @@ -#![allow(missing_docs)] +#![allow(clippy::allow_attributes, missing_docs, reason = "deprecated code")] use std::cell::RefCell; use std::marker::PhantomData; diff --git a/hydroflow/src/scheduled/net/mod.rs b/hydroflow/src/scheduled/net/mod.rs index 07309c81446..48ffc2e6115 100644 --- a/hydroflow/src/scheduled/net/mod.rs +++ b/hydroflow/src/scheduled/net/mod.rs @@ -1,5 +1,5 @@ #![cfg(not(target_arch = "wasm32"))] -#![allow(missing_docs)] +#![allow(clippy::allow_attributes, missing_docs, reason = "// TODO(mingwei)")] //! This module contiains networking code. //! diff --git a/hydroflow/src/scheduled/port.rs b/hydroflow/src/scheduled/port.rs index 0af3a316b19..e28b5a8fa38 100644 --- a/hydroflow/src/scheduled/port.rs +++ b/hydroflow/src/scheduled/port.rs @@ -20,12 +20,12 @@ pub trait Polarity: 'static {} /// An uninstantiable type used to tag port [`Polarity`] as **send**. /// /// See also: [`RECV`]. -#[allow(clippy::upper_case_acronyms)] +#[expect(clippy::upper_case_acronyms, reason = "marker type")] pub enum SEND {} /// An uninstantiable type used to tag port [`Polarity`] as **receive**. /// /// See also: [`SEND`]. -#[allow(clippy::upper_case_acronyms)] +#[expect(clippy::upper_case_acronyms, reason = "marker type")] pub enum RECV {} #[sealed] impl Polarity for SEND {} @@ -40,7 +40,7 @@ where H: Handoff, { pub(crate) handoff_id: HandoffId, - #[allow(clippy::type_complexity)] + #[expect(clippy::type_complexity, reason = "phantom data")] pub(crate) _marker: PhantomData<(*const S, fn() -> H)>, } /// Send-specific variant of [`Port`]. An output port. diff --git a/hydroflow/src/scheduled/query.rs b/hydroflow/src/scheduled/query.rs index af9b0d6cc4c..50595df4496 100644 --- a/hydroflow/src/scheduled/query.rs +++ b/hydroflow/src/scheduled/query.rs @@ -1,5 +1,5 @@ //! Old query API, where each operator is a single subgraph. Deprecated. -#![allow(missing_docs)] +#![allow(clippy::allow_attributes, missing_docs, reason = "deprecated")] use std::borrow::Cow; use std::cell::RefCell; diff --git a/hydroflow/src/util/deploy.rs b/hydroflow/src/util/deploy.rs index 522550ec768..64d436ea440 100644 --- a/hydroflow/src/util/deploy.rs +++ b/hydroflow/src/util/deploy.rs @@ -1,4 +1,4 @@ -#![allow(missing_docs)] // TODO(mingwei) +#![allow(clippy::allow_attributes, missing_docs, reason = "// TODO(mingwei)")] use std::cell::RefCell; use std::collections::HashMap; diff --git a/hydroflow/src/util/tcp.rs b/hydroflow/src/util/tcp.rs index e1c766aa01c..5f1cab36003 100644 --- a/hydroflow/src/util/tcp.rs +++ b/hydroflow/src/util/tcp.rs @@ -70,6 +70,7 @@ pub fn tcp_lines( /// A framed TCP `Sink` (sending). pub type TcpFramedSink = Sender<(T, SocketAddr)>; /// A framed TCP `Stream` (receiving). +#[expect(type_alias_bounds, reason = "code readability")] pub type TcpFramedStream = Receiver::Item, SocketAddr), ::Error>>; diff --git a/hydroflow/tests/groupby.rs b/hydroflow/tests/groupby.rs index a5c8edadbf1..0bed8bc1785 100644 --- a/hydroflow/tests/groupby.rs +++ b/hydroflow/tests/groupby.rs @@ -119,7 +119,7 @@ fn fold_keyed_monotonic_core() { let output = >>>::default(); let output_ref = output.clone(); hf.add_subgraph_sink("sink", sink_recv, move |_ctx, recv| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { output_ref.borrow_mut().push(v); } }); diff --git a/hydroflow/tests/scheduled_test.rs b/hydroflow/tests/scheduled_test.rs index a60abd679b9..36e90d52232 100644 --- a/hydroflow/tests/scheduled_test.rs +++ b/hydroflow/tests/scheduled_test.rs @@ -27,7 +27,7 @@ fn map_filter() { var_expr!(), var_expr!(source), move |_ctx, var_args!(), var_args!(send)| { - for x in data.into_iter() { + for x in data { send.give(Some(x)); } }, @@ -38,7 +38,7 @@ fn map_filter() { var_expr!(map_in), var_expr!(map_out), |_ctx, var_args!(recv), var_args!(send)| { - for x in recv.take_inner().into_iter() { + for x in recv.take_inner() { send.give(Some(3 * x + 1)); } }, @@ -49,7 +49,7 @@ fn map_filter() { var_expr!(filter_in), var_expr!(filter_out), |_ctx, var_args!(recv), var_args!(send)| { - for x in recv.take_inner().into_iter() { + for x in recv.take_inner() { if x % 2 == 0 { send.give(Some(x)); } @@ -64,7 +64,7 @@ fn map_filter() { var_expr!(sink), var_expr!(), move |_ctx, var_args!(recv), var_args!()| { - for x in recv.take_inner().into_iter() { + for x in recv.take_inner() { (*inner_outputs).borrow_mut().push(x); } }, @@ -87,7 +87,7 @@ fn test_basic_variadic() { let val_ref = val.clone(); df.add_subgraph_sink("sink", sink_recv, move |_ctx, recv| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { let old_val = val_ref.replace(Some(v)); assert!(old_val.is_none()); // Only run once. } @@ -121,7 +121,7 @@ fn test_basic_n_m() { vec![sink_recv], vec![], move |_ctx, recv, _send: &[&SendCtx>]| { - for v in recv[0].take_inner().into_iter() { + for v in recv[0].take_inner() { let old_val = val_ref.replace(Some(v)); assert!(old_val.is_none()); // Only run once. } @@ -190,7 +190,7 @@ fn test_cycle() { distinct_in, distinct_out, move |_ctx, recv, send| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { if seen.insert(v) { send.give(Some(v)); } @@ -203,7 +203,7 @@ fn test_cycle() { neighbors_in, neighbors_out, move |_ctx, recv, send| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { if let Some(neighbors) = edges.get(&v) { for &n in neighbors { send.give(Some(n)); @@ -219,7 +219,7 @@ fn test_cycle() { tee_out1, tee_out2, |_ctx, recv, send1, send2| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { send1.give(Some(v)); send2.give(Some(v)); } @@ -229,7 +229,7 @@ fn test_cycle() { let reachable_verts = Rc::new(RefCell::new(Vec::new())); let reachable_inner = reachable_verts.clone(); df.add_subgraph_sink("sink", sink_in, move |_ctx, recv| { - for v in recv.take_inner().into_iter() { + for v in recv.take_inner() { (*reachable_inner).borrow_mut().push(v); } }); diff --git a/hydroflow/tests/surface_codegen.rs b/hydroflow/tests/surface_codegen.rs index e89d570d1b3..09153afebad 100644 --- a/hydroflow/tests/surface_codegen.rs +++ b/hydroflow/tests/surface_codegen.rs @@ -118,7 +118,7 @@ pub fn test_basic_inspect_no_null() { // Mainly checking subgraph partitioning pull-push handling. #[multiplatform_test] pub fn test_large_diamond() { - #[allow(clippy::map_identity)] + #[expect(clippy::map_identity, reason = "testing topology")] let mut df: Hydroflow = hydroflow_syntax! { t = source_iter([1]) -> tee(); j = union() -> for_each(|x| println!("{}", x)); diff --git a/hydroflow/tests/surface_stratum.rs b/hydroflow/tests/surface_stratum.rs index 422304da374..91d88d9d4fb 100644 --- a/hydroflow/tests/surface_stratum.rs +++ b/hydroflow/tests/surface_stratum.rs @@ -167,7 +167,7 @@ pub fn test_surface_syntax_graph_unreachability() { // An edge in the input data = a pair of `usize` vertex IDs. let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - #[allow(clippy::map_identity)] + #[expect(clippy::map_identity, reason = "stratification topology testing")] let mut df = hydroflow_syntax! { reached_vertices = union() -> map(|v| (v, ())); source_iter(vec![0]) -> [0]reached_vertices; diff --git a/hydroflow_datalog/Cargo.toml b/hydroflow_datalog/Cargo.toml index e43b82dd8e8..93633dfe7d1 100644 --- a/hydroflow_datalog/Cargo.toml +++ b/hydroflow_datalog/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_datalog/" description = "Datalog proc-macro for Hydroflow" +[lints] +workspace = true + [lib] proc-macro = true path = "src/lib.rs" diff --git a/hydroflow_datalog_core/Cargo.toml b/hydroflow_datalog_core/Cargo.toml index 80239874317..c2ee69bf0ea 100644 --- a/hydroflow_datalog_core/Cargo.toml +++ b/hydroflow_datalog_core/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_datalog_core/" description = "Datalog implementation for Hydroflow" +[lints] +workspace = true + [lib] path = "src/lib.rs" diff --git a/hydroflow_datalog_core/src/grammar.rs b/hydroflow_datalog_core/src/grammar.rs index 5076bc6811f..fe9f95360f4 100644 --- a/hydroflow_datalog_core/src/grammar.rs +++ b/hydroflow_datalog_core/src/grammar.rs @@ -1,5 +1,5 @@ #[rust_sitter::grammar("datalog")] -#[allow(dead_code)] +// #[expect(dead_code)] pub mod datalog { use rust_sitter::Spanned; @@ -85,6 +85,7 @@ pub mod datalog { #[derive(Debug, Clone)] pub enum ExtractExpr { Ident(Spanned), + #[expect(dead_code, reason = "unused spanned")] Underscore(#[rust_sitter::leaf(text = "_")] Spanned<()>), Flatten(#[rust_sitter::leaf(text = "*")] (), Box), Untuple( @@ -135,7 +136,7 @@ pub mod datalog { } #[derive(Debug, Clone)] - #[allow(clippy::manual_non_exhaustive)] + #[expect(clippy::manual_non_exhaustive, reason = "`()` used for leaf")] pub struct AtNode { #[rust_sitter::leaf(text = "@")] _at: (), diff --git a/hydroflow_datalog_core/src/join_plan.rs b/hydroflow_datalog_core/src/join_plan.rs index c04eafd21b0..6bdd103ad72 100644 --- a/hydroflow_datalog_core/src/join_plan.rs +++ b/hydroflow_datalog_core/src/join_plan.rs @@ -189,7 +189,6 @@ fn gen_predicate_value_expr( ) } -#[allow(clippy::too_many_arguments)] /// Processes an extract expression to generate a Hydroflow pipeline that reads the input /// data from the IDB/EDB. /// @@ -201,6 +200,7 @@ fn gen_predicate_value_expr( /// This function returns the number of elements in the tuple that will be emitted by the /// extraction of the `ExtractExpr`. So for a single variable, it will return `1`, for a /// tuple, it will return sum of the number of elements emitted by its children. +#[expect(clippy::too_many_arguments, reason = "internal code")] fn process_extract( extract: &ExtractExpr, variable_mapping: &mut BTreeMap, diff --git a/hydroflow_datalog_core/src/lib.rs b/hydroflow_datalog_core/src/lib.rs index 277d3c97f54..27203bdd6a3 100644 --- a/hydroflow_datalog_core/src/lib.rs +++ b/hydroflow_datalog_core/src/lib.rs @@ -339,7 +339,7 @@ pub fn hydroflow_graph_to_program(flat_graph: HydroflowGraph, root: TokenStream) code_tokens } -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments, reason = "internal code")] fn generate_rule( plan: JoinPlan<'_>, rule: &rust_sitter::Spanned, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap index 4bdb45333f6..ecb90385183 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_and_comments@datalog_program.snap @@ -468,6 +468,10 @@ fn main() { } op_14v1__fold_keyed__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_14v1.map(|(g, a): ((_,), _)| (a.0.unwrap().1, g.0)); let op_15v1 = { #[allow(non_snake_case)] @@ -765,6 +769,10 @@ fn main() { } op_21v1__fold_keyed__loc_nopath_1_0_1_0(op_21v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_22v1 = op_21v1.map(|(g, a): ((_,), _)| (a.0.unwrap(), g.0)); let op_22v1 = { #[allow(non_snake_case)] @@ -1008,6 +1016,10 @@ fn main() { { hoff_6v3_send.give(Some(v)); }); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = hoff_7v3_recv .map(|(g, a): ((_,), _)| (a.0.unwrap(), g.0)); let op_18v1 = { diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap index 010b0358279..2571aa97ad2 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__aggregations_fold_keyed_expr@datalog_program.snap @@ -158,6 +158,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1.map(|row: (_, _)| ((row.0 % 2,), (row.1,))); let op_9v1 = { #[allow(non_snake_case)] @@ -289,6 +293,10 @@ fn main() { } op_10v1__fold_keyed__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_,), _)| (g.0, a.0.unwrap())); let op_11v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap index d4a9e1937ed..7846d1ef1f3 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__anti_join@datalog_program.snap @@ -248,6 +248,10 @@ fn main() { } op_8v1__unique__loc_nopath_4_19_4_25(op_8v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_24v1 = op_8v1.map(|_v: (_,)| (_v.0,)); let op_24v1 = { #[allow(non_snake_case)] @@ -535,6 +539,10 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_25(op_5v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = op_2v1.map(|_v: (_, _)| ((_v.1,), (_v.0,))); let op_19v1 = { #[allow(non_snake_case)] @@ -568,6 +576,10 @@ fn main() { } op_19v1__map__loc_nopath_7_28_7_40(op_19v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_20v1 = op_5v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_20v1 = { #[allow(non_snake_case)] @@ -679,6 +691,10 @@ fn main() { } op_17v1__join__loc_nopath_7_12_7_66(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1 .map(|kv: ((_,), ((_,), (_,)))| (kv.0.0, kv.1.0.0, kv.1.1.0)); let op_18v1 = { @@ -713,6 +729,10 @@ fn main() { } op_18v1__map__loc_nopath_7_12_7_66(op_18v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_23v1 = op_18v1.map(|_v: (_, _, _)| ((_v.0,), (_v.1, _v.2))); let op_23v1 = { #[allow(non_snake_case)] @@ -818,6 +838,10 @@ fn main() { } op_21v1__anti_join__loc_nopath_7_12_7_66(op_21v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_22v1 = op_21v1 .map(|kv: ((_,), (_, _))| (kv.0.0, kv.1.0, kv.1.1)); let op_22v1 = { @@ -852,6 +876,10 @@ fn main() { } op_22v1__map__loc_nopath_7_12_7_66(op_22v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_25v1 = op_22v1.map(|row: (_, _, _)| ((row.1, row.2), ())); let op_25v1 = { #[allow(non_snake_case)] @@ -885,6 +913,10 @@ fn main() { } op_25v1__map__loc_nopath_1_0_1_0(op_25v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_26v1 = op_25v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_26v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap index cc59dad4fd1..872c2f668ce 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__collect_vec@datalog_program.snap @@ -292,6 +292,10 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_24(op_5v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_2v1.map(|_v: (_,)| ((), (_v.0,))); let op_15v1 = { #[allow(non_snake_case)] @@ -325,6 +329,10 @@ fn main() { } op_15v1__map__loc_nopath_7_41_7_49(op_15v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = op_5v1.map(|_v: (_,)| ((), (_v.0,))); let op_16v1 = { #[allow(non_snake_case)] @@ -436,6 +444,10 @@ fn main() { } op_13v1__join__loc_nopath_7_12_7_59(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1 .map(|kv: ((), ((_,), (_,)))| (kv.1.0.0, kv.1.1.0)); let op_14v1 = { @@ -470,6 +482,10 @@ fn main() { } op_14v1__map__loc_nopath_7_12_7_59(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_17v1 = op_14v1.map(|row: (_, _)| ((), ((row.0, row.1),))); let op_17v1 = { #[allow(non_snake_case)] @@ -611,6 +627,10 @@ fn main() { } op_18v1__fold_keyed__loc_nopath_1_0_1_0(op_18v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = op_18v1 .map(|(g, a): ((), _)| ( a.0.unwrap().into_iter().collect::>(), diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap index 180ac6e8074..1e92fc65bce 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple@datalog_program.snap @@ -142,6 +142,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1 .map(|row_untuple: (_,)| (row_untuple.0.0, row_untuple.0.1)); let op_9v1 = { @@ -176,6 +180,10 @@ fn main() { } op_9v1__map__loc_nopath_6_12_6_41(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_10v1 = { #[allow(non_snake_case)] @@ -209,6 +217,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_11v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap index da72918be95..2cbc8a5f4d2 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__detuple_then_flat@datalog_program.snap @@ -142,6 +142,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1 .map(|row_untuple: (_,)| (row_untuple.0.0, row_untuple.0.1)); let op_9v1 = { @@ -260,6 +264,10 @@ fn main() { } op_11v1__flat_map__loc_nopath_6_12_6_43(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_12v1 = op_11v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_12v1 = { #[allow(non_snake_case)] @@ -293,6 +301,10 @@ fn main() { } op_12v1__map__loc_nopath_1_0_1_0(op_12v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = op_12v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_13v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap index 1e7fe95e871..c4206cfd331 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_lhs@datalog_program.snap @@ -298,6 +298,10 @@ fn main() { let hoff_23v1_recv = hoff_23v1_recv.drain(..); let mut hoff_24v1_recv = hoff_24v1_recv.borrow_mut_swap(); let hoff_24v1_recv = hoff_24v1_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = hoff_6v3_recv.map(|row: (_,)| ((123,), ())); let op_9v1 = { #[allow(non_snake_case)] @@ -331,6 +335,10 @@ fn main() { } op_9v1__map__loc_nopath_1_0_1_0(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|(g, a): ((_,), _)| (g.0,)); let op_10v1 = { #[allow(non_snake_case)] @@ -364,6 +372,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = hoff_1v3_recv.map(|row: (_,)| ((row.0 + 123,), ())); let op_11v1 = { #[allow(non_snake_case)] @@ -397,6 +409,10 @@ fn main() { } op_11v1__map__loc_nopath_1_0_1_0(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_12v1 = op_11v1.map(|(g, a): ((_,), _)| (g.0,)); let op_12v1 = { #[allow(non_snake_case)] @@ -430,6 +446,10 @@ fn main() { } op_12v1__map__loc_nopath_1_0_1_0(op_12v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = hoff_21v1_recv .map(|row: (_,)| ((row.0.clone() + row.0,), ())); let op_13v1 = { @@ -464,6 +484,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); let op_14v1 = { #[allow(non_snake_case)] @@ -497,6 +521,10 @@ fn main() { } op_14v1__map__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = hoff_22v1_recv.map(|row: (_,)| ((123 - row.0,), ())); let op_15v1 = { #[allow(non_snake_case)] @@ -530,6 +558,10 @@ fn main() { } op_15v1__map__loc_nopath_1_0_1_0(op_15v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = op_15v1.map(|(g, a): ((_,), _)| (g.0,)); let op_16v1 = { #[allow(non_snake_case)] @@ -563,6 +595,10 @@ fn main() { } op_16v1__map__loc_nopath_1_0_1_0(op_16v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_17v1 = hoff_23v1_recv .map(|row: (_,)| ((123 % (row.0 + 5),), ())); let op_17v1 = { @@ -597,6 +633,10 @@ fn main() { } op_17v1__map__loc_nopath_1_0_1_0(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1.map(|(g, a): ((_,), _)| (g.0,)); let op_18v1 = { #[allow(non_snake_case)] @@ -630,6 +670,10 @@ fn main() { } op_18v1__map__loc_nopath_1_0_1_0(op_18v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = hoff_24v1_recv.map(|row: (_,)| ((row.0 * 5,), ())); let op_19v1 = { #[allow(non_snake_case)] @@ -663,6 +707,10 @@ fn main() { } op_19v1__map__loc_nopath_1_0_1_0(op_19v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_20v1 = op_19v1.map(|(g, a): ((_,), _)| (g.0,)); let op_20v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap index 93304d58550..8dff199f678 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__expr_predicate@datalog_program.snap @@ -393,6 +393,10 @@ fn main() { let hoff_21v1_recv = hoff_21v1_recv.drain(..); let mut hoff_22v1_recv = hoff_22v1_recv.borrow_mut_swap(); let hoff_22v1_recv = hoff_22v1_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = hoff_6v3_recv.map(|row: (_,)| ((1,), ())); let op_10v1 = { #[allow(non_snake_case)] @@ -426,6 +430,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_,), _)| (g.0,)); let op_11v1 = { #[allow(non_snake_case)] @@ -459,6 +467,10 @@ fn main() { } op_11v1__map__loc_nopath_1_0_1_0(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = hoff_1v3_recv.map(|row: (_,)| ((2,), ())); let op_13v1 = { #[allow(non_snake_case)] @@ -492,6 +504,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); let op_14v1 = { #[allow(non_snake_case)] @@ -525,6 +541,10 @@ fn main() { } op_14v1__map__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = hoff_21v1_recv.map(|row: (_,)| ((3,), ())); let op_16v1 = { #[allow(non_snake_case)] @@ -558,6 +578,10 @@ fn main() { } op_16v1__map__loc_nopath_1_0_1_0(op_16v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_17v1 = op_16v1.map(|(g, a): ((_,), _)| (g.0,)); let op_17v1 = { #[allow(non_snake_case)] @@ -591,6 +615,10 @@ fn main() { } op_17v1__map__loc_nopath_1_0_1_0(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = hoff_22v1_recv.map(|row: (_,)| ((4,), ())); let op_19v1 = { #[allow(non_snake_case)] @@ -624,6 +652,10 @@ fn main() { } op_19v1__map__loc_nopath_1_0_1_0(op_19v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_20v1 = op_19v1.map(|(g, a): ((_,), _)| (g.0,)); let op_20v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap index c45e2061b6d..3a14f2488ed 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flat_then_detuple@datalog_program.snap @@ -181,6 +181,10 @@ fn main() { } op_9v1__flat_map__loc_nopath_6_12_6_42(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1 .map(|row_untuple: (_,)| (row_untuple.0.0, row_untuple.0.1)); let op_10v1 = { @@ -215,6 +219,10 @@ fn main() { } op_10v1__map__loc_nopath_6_12_6_42(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_11v1 = { #[allow(non_snake_case)] @@ -248,6 +256,10 @@ fn main() { } op_11v1__map__loc_nopath_1_0_1_0(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_12v1 = op_11v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_12v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap index 80620fc4fed..dbb1c6a0508 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__flatten@datalog_program.snap @@ -184,6 +184,10 @@ fn main() { } op_9v1__flat_map__loc_nopath_6_12_6_40(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_10v1 = { #[allow(non_snake_case)] @@ -217,6 +221,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_11v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap index 52fd91ef1fc..efa06760586 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__index@datalog_program.snap @@ -885,6 +885,10 @@ fn main() { } op_38v1__enumerate__loc_nopath_1_0_1_0(op_38v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_39v1 = op_38v1 .map(|(__enumerate_index, (g, a)): (_, ((_,), _))| ( g.0, @@ -1046,6 +1050,10 @@ fn main() { { hoff_13v3_send.give(Some(v)); }); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_41v1 = hoff_16v3_recv.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_41v1 = { #[allow(non_snake_case)] @@ -1732,6 +1740,10 @@ fn main() { } op_48v1__enumerate__loc_nopath_1_0_1_0(op_48v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_49v1 = op_48v1 .map(|(__enumerate_index, (g, a)): (_, ((_,), _))| ( g.0, @@ -1925,6 +1937,10 @@ fn main() { } op_51v1__enumerate__loc_nopath_1_0_1_0(op_51v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_52v1 = op_51v1 .map(|(__enumerate_index, (g, a)): (_, ((_, _), _))| ( g.0, diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap index ecd66039e69..3a750740ca3 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_other@datalog_program.snap @@ -276,6 +276,10 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_2v1.map(|_v: (_, _)| ((_v.0, _v.1), ())); let op_15v1 = { #[allow(non_snake_case)] @@ -309,6 +313,10 @@ fn main() { } op_15v1__map__loc_nopath_6_25_6_34(op_15v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = op_5v1.map(|_v: (_, _)| ((_v.1, _v.0), ())); let op_16v1 = { #[allow(non_snake_case)] @@ -420,6 +428,10 @@ fn main() { } op_13v1__join__loc_nopath_6_12_6_46(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|kv: ((_, _), ((), ()))| (kv.0.0, kv.0.1)); let op_14v1 = { #[allow(non_snake_case)] @@ -453,6 +465,10 @@ fn main() { } op_14v1__map__loc_nopath_6_12_6_46(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_17v1 = op_14v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_17v1 = { #[allow(non_snake_case)] @@ -486,6 +502,10 @@ fn main() { } op_17v1__map__loc_nopath_1_0_1_0(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_18v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap index fd9a2581760..0b5cd7f8294 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__join_with_self@datalog_program.snap @@ -238,6 +238,10 @@ fn main() { let hoff_4v3_recv = hoff_4v3_recv.drain(..); let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); let hoff_6v3_recv = hoff_6v3_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = hoff_6v3_recv.map(|_v: (_, _)| ((_v.0, _v.1), ())); let op_11v1 = { #[allow(non_snake_case)] @@ -271,6 +275,10 @@ fn main() { } op_11v1__map__loc_nopath_5_25_5_36(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_12v1 = hoff_4v3_recv.map(|_v: (_, _)| ((_v.1, _v.0), ())); let op_12v1 = { #[allow(non_snake_case)] @@ -382,6 +390,10 @@ fn main() { } op_9v1__join__loc_nopath_5_12_5_50(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|kv: ((_, _), ((), ()))| (kv.0.0, kv.0.1)); let op_10v1 = { #[allow(non_snake_case)] @@ -415,6 +427,10 @@ fn main() { } op_10v1__map__loc_nopath_5_12_5_50(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = op_10v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_13v1 = { #[allow(non_snake_case)] @@ -448,6 +464,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_14v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap index 2ddbea1c9af..f9e805b2d63 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program-2.snap @@ -176,6 +176,10 @@ fn main() { } op_9v1__filter__loc_nopath_5_12_5_49(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1 .map(|row: (_, _, _, _)| ( (row.0.clone(), row.0, row.2.clone(), row.2), @@ -213,6 +217,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1 .map(|(g, a): ((_, _, _, _), _)| (g.0, g.1, g.2, g.3)); let op_11v1 = { diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap index 1e1533ea303..07759fdcbc8 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__local_constraints@datalog_program.snap @@ -175,6 +175,10 @@ fn main() { } op_9v1__filter__loc_nopath_5_12_5_37(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0.clone(), row.0), ())); let op_10v1 = { #[allow(non_snake_case)] @@ -208,6 +212,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_11v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap index 352e60cac6b..c3e12b920a4 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max@datalog_program.snap @@ -158,6 +158,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1.map(|row: (_, _)| ((row.1,), (row.0,))); let op_9v1 = { #[allow(non_snake_case)] @@ -289,6 +293,10 @@ fn main() { } op_10v1__fold_keyed__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_,), _)| (a.0.unwrap(), g.0)); let op_11v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap index b6327a925b1..319c1fba517 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__max_all@datalog_program.snap @@ -161,6 +161,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1.map(|row: (_, _)| ((), (row.0, row.1))); let op_9v1 = { #[allow(non_snake_case)] @@ -297,6 +301,10 @@ fn main() { } op_10v1__fold_keyed__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1 .map(|(g, a): ((), _)| (a.0.unwrap(), a.1.unwrap())); let op_11v1 = { diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap index 59185816507..0e148142fd4 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__minimal_program@datalog_program.snap @@ -142,6 +142,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1.map(|row: (_, _)| ((row.1, row.0), ())); let op_9v1 = { #[allow(non_snake_case)] @@ -175,6 +179,10 @@ fn main() { } op_9v1__map__loc_nopath_1_0_1_0(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_10v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap index 3e740f8d81c..13d8c8d8c3b 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multi_detuple@datalog_program.snap @@ -142,6 +142,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_24(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1 .map(|row_untuple: (_, _)| ( row_untuple.0.0, @@ -180,6 +184,10 @@ fn main() { } op_9v1__map__loc_nopath_6_12_6_55(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1 .map(|row_untuple: (_, _, _)| ( row_untuple.0, @@ -219,6 +227,10 @@ fn main() { } op_10v1__map__loc_nopath_6_12_6_55(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1 .map(|row: (_, _, _, _)| ((row.0, row.1, row.2, row.3), ())); let op_11v1 = { @@ -253,6 +265,10 @@ fn main() { } op_11v1__map__loc_nopath_1_0_1_0(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_12v1 = op_11v1 .map(|(g, a): ((_, _, _, _), _)| (g.0, g.1, g.2, g.3)); let op_12v1 = { diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap index 7af3308d132..a60f6714201 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__multiple_contributors@datalog_program.snap @@ -256,6 +256,10 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = op_2v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_13v1 = { #[allow(non_snake_case)] @@ -289,6 +293,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_14v1 = { #[allow(non_snake_case)] @@ -322,6 +330,10 @@ fn main() { } op_14v1__map__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_5v1.map(|row: (_, _)| ((row.1, row.0), ())); let op_15v1 = { #[allow(non_snake_case)] @@ -355,6 +367,10 @@ fn main() { } op_15v1__map__loc_nopath_1_0_1_0(op_15v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = op_15v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_16v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap index 54af4da6c33..83bdd91fba5 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__non_copy_but_clone@datalog_program.snap @@ -142,6 +142,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_26(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_9v1 = op_2v1.map(|row: (_,)| ((row.0.clone(), row.0), ())); let op_9v1 = { #[allow(non_snake_case)] @@ -175,6 +179,10 @@ fn main() { } op_9v1__map__loc_nopath_1_0_1_0(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_10v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap index b0dcecbfc77..2f0da258c6f 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist@datalog_program.snap @@ -754,6 +754,10 @@ fn main() { } op_12v1__unique__loc_nopath_8_19_8_24(op_12v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_43v1 = hoff_29v3_recv.map(|_v: (_,)| ((), (_v.0,))); let op_43v1 = { #[allow(non_snake_case)] @@ -787,6 +791,10 @@ fn main() { } op_43v1__map__loc_nopath_15_31_15_39(op_43v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_44v1 = hoff_26v3_recv.map(|_v: (_,)| ((), (_v.0,))); let op_44v1 = { #[allow(non_snake_case)] @@ -898,6 +906,10 @@ fn main() { } op_41v1__join__loc_nopath_15_12_15_59(op_41v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_42v1 = op_41v1 .map(|kv: ((), ((_,), (_,)))| (kv.1.0.0, kv.1.1.0)); let op_42v1 = { @@ -932,6 +944,10 @@ fn main() { } op_42v1__map__loc_nopath_15_12_15_59(op_42v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_47v1 = op_42v1.map(|_v: (_, _)| ((), (_v.0, _v.1))); let op_47v1 = { #[allow(non_snake_case)] @@ -965,6 +981,10 @@ fn main() { } op_47v1__map__loc_nopath_15_31_15_49(op_47v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_48v1 = op_12v1.map(|_v: (_,)| ((), (_v.0,))); let op_48v1 = { #[allow(non_snake_case)] @@ -1076,6 +1096,10 @@ fn main() { } op_45v1__join__loc_nopath_15_12_15_59(op_45v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_46v1 = op_45v1 .map(|kv: ((), ((_, _), (_,)))| (kv.1.0.0, kv.1.0.1, kv.1.1.0)); let op_46v1 = { @@ -1110,6 +1134,10 @@ fn main() { } op_46v1__map__loc_nopath_15_12_15_59(op_46v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_49v1 = op_46v1 .map(|row: (_, _, _)| ((row.0, row.1, row.2), ())); let op_49v1 = { @@ -1144,6 +1172,10 @@ fn main() { } op_49v1__map__loc_nopath_1_0_1_0(op_49v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_50v1 = op_49v1.map(|(g, a): ((_, _, _), _)| (g.0, g.1, g.2)); let op_50v1 = { #[allow(non_snake_case)] @@ -1328,6 +1360,10 @@ fn main() { } op_53v1__persist__loc_nopath_16_26_16_34(op_53v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_54v1 = op_53v1.map(|_v: (_,)| ((_v.0,), ())); let op_54v1 = { #[allow(non_snake_case)] @@ -1433,6 +1469,10 @@ fn main() { } op_51v1__anti_join__loc_nopath_16_12_16_45(op_51v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_52v1 = op_51v1.map(|kv: ((_,), ())| (kv.0.0,)); let op_52v1 = { #[allow(non_snake_case)] @@ -1466,6 +1506,10 @@ fn main() { } op_52v1__map__loc_nopath_16_12_16_45(op_52v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_57v1 = op_52v1.map(|row: (_,)| ((row.0,), ())); let op_57v1 = { #[allow(non_snake_case)] @@ -1499,6 +1543,10 @@ fn main() { } op_57v1__map__loc_nopath_1_0_1_0(op_57v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_58v1 = op_57v1.map(|(g, a): ((_,), _)| (g.0,)); let op_58v1 = { #[allow(non_snake_case)] @@ -2227,6 +2275,10 @@ fn main() { { hoff_13v3_send.give(Some(v)); }); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_65v1 = hoff_17v3_recv.map(|(g, a): ((_,), _)| (g.0,)); let op_65v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap index 43759f09ac5..ed9e278356b 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__persist_uniqueness@datalog_program.snap @@ -338,6 +338,10 @@ fn main() { } op_17v1__fold_keyed__loc_nopath_1_0_1_0(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1.map(|(g, a): ((), _)| (a.0.unwrap().1,)); let op_18v1 = { #[allow(non_snake_case)] @@ -539,6 +543,10 @@ fn main() { } op_7v1__unique__loc_nopath_4_19_4_24(op_7v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_7v1.map(|row: (_,)| ((row.0,), ())); let op_14v1 = { #[allow(non_snake_case)] @@ -572,6 +580,10 @@ fn main() { } op_14v1__map__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_14v1.map(|(g, a): ((_,), _)| (g.0,)); let op_15v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap index 81103579bfd..ae7b3312a10 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__send_to_node@datalog_program.snap @@ -307,6 +307,10 @@ fn main() { } op_2v1__unique__loc_nopath_2_19_2_23(op_2v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = op_2v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_13v1 = { #[allow(non_snake_case)] @@ -340,6 +344,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_14v1 = { #[allow(non_snake_case)] @@ -373,6 +381,10 @@ fn main() { } op_14v1__map__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_14v1.map(|v: (_, _)| (v.1, (v.0,))); let op_15v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap index 58979c99119..7be3dad3e83 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__simple_filter@datalog_program.snap @@ -176,6 +176,10 @@ fn main() { } op_9v1__filter__loc_nopath_5_12_5_60(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1.map(|row: (_, _)| ((row.0, row.1), ())); let op_10v1 = { #[allow(non_snake_case)] @@ -209,6 +213,10 @@ fn main() { } op_10v1__map__loc_nopath_1_0_1_0(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = op_10v1.map(|(g, a): ((_, _), _)| (g.0, g.1)); let op_11v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap index 9b672f1c5b6..fbbddeb2e48 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__single_column_program@datalog_program.snap @@ -276,6 +276,10 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_22(op_5v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_15v1 = op_2v1.map(|_v: (_,)| ((_v.0,), ())); let op_15v1 = { #[allow(non_snake_case)] @@ -309,6 +313,10 @@ fn main() { } op_15v1__map__loc_nopath_6_22_6_28(op_15v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = op_5v1.map(|_v: (_,)| ((_v.0,), ())); let op_16v1 = { #[allow(non_snake_case)] @@ -420,6 +428,10 @@ fn main() { } op_13v1__join__loc_nopath_6_12_6_37(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|kv: ((_,), ((), ()))| (kv.0.0,)); let op_14v1 = { #[allow(non_snake_case)] @@ -453,6 +465,10 @@ fn main() { } op_14v1__map__loc_nopath_6_12_6_37(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_17v1 = op_14v1.map(|row: (_,)| ((row.0,), ())); let op_17v1 = { #[allow(non_snake_case)] @@ -486,6 +502,10 @@ fn main() { } op_17v1__map__loc_nopath_1_0_1_0(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1.map(|(g, a): ((_,), _)| (g.0,)); let op_18v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap index 2543f34e385..ff630c42e37 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__transitive_closure@datalog_program.snap @@ -288,6 +288,10 @@ fn main() { } op_5v1__unique__loc_nopath_3_19_3_33(op_5v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = op_5v1.map(|row: (_,)| ((row.0,), ())); let op_13v1 = { #[allow(non_snake_case)] @@ -321,6 +325,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); let op_14v1 = { #[allow(non_snake_case)] @@ -354,6 +362,10 @@ fn main() { } op_14v1__map__loc_nopath_1_0_1_0(op_14v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_17v1 = hoff_6v3_recv.map(|_v: (_,)| ((_v.0,), ())); let op_17v1 = { #[allow(non_snake_case)] @@ -387,6 +399,10 @@ fn main() { } op_17v1__map__loc_nopath_7_28_7_40(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_2v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_18v1 = { #[allow(non_snake_case)] @@ -498,6 +514,10 @@ fn main() { } op_15v1__join__loc_nopath_7_12_7_54(op_15v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_16v1 = op_15v1 .map(|kv: ((_,), ((), (_,)))| (kv.0.0, kv.1.1.0)); let op_16v1 = { @@ -532,6 +552,10 @@ fn main() { } op_16v1__map__loc_nopath_7_12_7_54(op_16v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = op_16v1.map(|row: (_, _)| ((row.1,), ())); let op_19v1 = { #[allow(non_snake_case)] @@ -565,6 +589,10 @@ fn main() { } op_19v1__map__loc_nopath_1_0_1_0(op_19v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_20v1 = op_19v1.map(|(g, a): ((_,), _)| (g.0,)); let op_20v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap index 77005095a5a..969ec389b95 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__triple_relation_join@datalog_program.snap @@ -410,6 +410,10 @@ fn main() { } op_8v1__unique__loc_nopath_4_19_4_22(op_8v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = op_2v1.map(|_v: (_, _)| ((_v.1,), (_v.0,))); let op_19v1 = { #[allow(non_snake_case)] @@ -443,6 +447,10 @@ fn main() { } op_19v1__map__loc_nopath_7_31_7_40(op_19v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_20v1 = op_5v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_20v1 = { #[allow(non_snake_case)] @@ -554,6 +562,10 @@ fn main() { } op_17v1__join__loc_nopath_7_12_7_63(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1 .map(|kv: ((_,), ((_,), (_,)))| (kv.0.0, kv.1.0.0, kv.1.1.0)); let op_18v1 = { @@ -588,6 +600,10 @@ fn main() { } op_18v1__map__loc_nopath_7_12_7_63(op_18v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_23v1 = op_18v1.map(|_v: (_, _, _)| ((_v.2,), (_v.1, _v.0))); let op_23v1 = { #[allow(non_snake_case)] @@ -621,6 +637,10 @@ fn main() { } op_23v1__map__loc_nopath_7_31_7_51(op_23v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_24v1 = op_8v1.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_24v1 = { #[allow(non_snake_case)] @@ -732,6 +752,10 @@ fn main() { } op_21v1__join__loc_nopath_7_12_7_63(op_21v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_22v1 = op_21v1 .map(|kv: ((_,), ((_, _), (_,)))| ( kv.0.0, @@ -771,6 +795,10 @@ fn main() { } op_22v1__map__loc_nopath_7_12_7_63(op_22v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_25v1 = op_22v1 .map(|row: (_, _, _, _)| ((row.3, row.0, row.2, row.1), ())); let op_25v1 = { @@ -805,6 +833,10 @@ fn main() { } op_25v1__map__loc_nopath_1_0_1_0(op_25v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_26v1 = op_25v1 .map(|(g, a): ((_, _, _, _), _)| (g.0, g.1, g.2, g.3)); let op_26v1 = { diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap index 1714183c8c5..277d0b9c27e 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_fields@datalog_program.snap @@ -238,6 +238,10 @@ fn main() { let hoff_4v3_recv = hoff_4v3_recv.drain(..); let mut hoff_6v3_recv = hoff_6v3_recv.borrow_mut_swap(); let hoff_6v3_recv = hoff_6v3_recv.drain(..); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_11v1 = hoff_6v3_recv.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_11v1 = { #[allow(non_snake_case)] @@ -271,6 +275,10 @@ fn main() { } op_11v1__map__loc_nopath_5_22_5_33(op_11v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_12v1 = hoff_4v3_recv.map(|_v: (_, _)| ((_v.1,), (_v.0,))); let op_12v1 = { #[allow(non_snake_case)] @@ -382,6 +390,10 @@ fn main() { } op_9v1__join__loc_nopath_5_12_5_47(op_9v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_10v1 = op_9v1 .map(|kv: ((_,), ((_,), (_,)))| (kv.0.0, kv.1.0.0, kv.1.1.0)); let op_10v1 = { @@ -416,6 +428,10 @@ fn main() { } op_10v1__map__loc_nopath_5_12_5_47(op_10v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_13v1 = op_10v1.map(|row: (_, _, _)| ((row.0,), ())); let op_13v1 = { #[allow(non_snake_case)] @@ -449,6 +465,10 @@ fn main() { } op_13v1__map__loc_nopath_1_0_1_0(op_13v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_14v1 = op_13v1.map(|(g, a): ((_,), _)| (g.0,)); let op_14v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap index 0d7e0c94c58..61ba10cfba1 100644 --- a/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap +++ b/hydroflow_datalog_core/src/snapshots/hydroflow_datalog_core__tests__wildcard_join_count@datalog_program.snap @@ -551,6 +551,10 @@ fn main() { } op_22v1__fold_keyed__loc_nopath_1_0_1_0(op_22v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_23v1 = op_22v1.map(|(g, a): ((), _)| (a.0.unwrap(),)); let op_23v1 = { #[allow(non_snake_case)] @@ -778,6 +782,10 @@ fn main() { } op_29v1__fold_keyed__loc_nopath_1_0_1_0(op_29v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_30v1 = op_29v1.map(|(g, a): ((), _)| (a.0.unwrap().1,)); let op_30v1 = { #[allow(non_snake_case)] @@ -924,6 +932,10 @@ fn main() { { hoff_10v3_send.give(Some(v)); }); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_19v1 = hoff_12v3_recv.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_19v1 = { #[allow(non_snake_case)] @@ -957,6 +969,10 @@ fn main() { } op_19v1__map__loc_nopath_8_32_8_43(op_19v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_20v1 = hoff_9v3_recv.map(|_v: (_,)| ((_v.0,), ())); let op_20v1 = { #[allow(non_snake_case)] @@ -1068,6 +1084,10 @@ fn main() { } op_17v1__join__loc_nopath_8_12_8_53(op_17v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_18v1 = op_17v1 .map(|kv: ((_,), ((_,), ()))| (kv.0.0, kv.1.0.0)); let op_18v1 = { @@ -1102,6 +1122,10 @@ fn main() { } op_18v1__map__loc_nopath_8_12_8_53(op_18v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_21v1 = op_18v1.map(|row: (_, _)| ((), ((),))); let op_21v1 = { #[allow(non_snake_case)] @@ -1166,6 +1190,10 @@ fn main() { { hoff_1v3_send.give(Some(v)); }); + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_26v1 = hoff_7v3_recv.map(|_v: (_, _)| ((_v.0,), (_v.1,))); let op_26v1 = { #[allow(non_snake_case)] @@ -1199,6 +1227,10 @@ fn main() { } op_26v1__map__loc_nopath_9_33_9_44(op_26v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_27v1 = hoff_4v3_recv.map(|_v: (_,)| ((_v.0,), ())); let op_27v1 = { #[allow(non_snake_case)] @@ -1310,6 +1342,10 @@ fn main() { } op_24v1__join__loc_nopath_9_12_9_54(op_24v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_25v1 = op_24v1 .map(|kv: ((_,), ((_,), ()))| (kv.0.0, kv.1.0.0)); let op_25v1 = { @@ -1344,6 +1380,10 @@ fn main() { } op_25v1__map__loc_nopath_9_12_9_54(op_25v1) }; + #[allow( + clippy::map_clone, + reason = "hydroflow has no explicit `cloned`/`copied` operator" + )] let op_28v1 = op_25v1.map(|row: (_, _)| ((), ((row.0),))); let op_28v1 = { #[allow(non_snake_case)] diff --git a/hydroflow_lang/Cargo.toml b/hydroflow_lang/Cargo.toml index 0df500fe3ef..40fc75f5d0f 100644 --- a/hydroflow_lang/Cargo.toml +++ b/hydroflow_lang/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_lang/" description = "Hydroflow's Surface Syntax implementation" +[lints] +workspace = true + [features] default = [] diagnostics = [] diff --git a/hydroflow_lang/src/graph/di_mul_graph.rs b/hydroflow_lang/src/graph/di_mul_graph.rs index fa34c74bf77..edf1e2199e3 100644 --- a/hydroflow_lang/src/graph/di_mul_graph.rs +++ b/hydroflow_lang/src/graph/di_mul_graph.rs @@ -313,7 +313,7 @@ where } /// A compact edge list representation of a [`DiMulGraph`], used for serialization. -#[allow(type_alias_bounds)] +#[expect(type_alias_bounds, reason = "code readability")] pub type EdgeList where V: Key, diff --git a/hydroflow_lang/src/graph/graph_write.rs b/hydroflow_lang/src/graph/graph_write.rs index 8ba9106ae34..f2719c8e419 100644 --- a/hydroflow_lang/src/graph/graph_write.rs +++ b/hydroflow_lang/src/graph/graph_write.rs @@ -167,7 +167,7 @@ where ) -> Result<(), Self::Err> { let src_str = format!("{:?}", src_id.data()); let dest_str = format!("{:?}", dst_id.data()); - #[allow(clippy::write_literal)] + #[expect(clippy::write_literal, reason = "code readability")] write!( self.write, "{src}{arrow_body}{arrow_head}{label}{dst}", diff --git a/hydroflow_lang/src/graph/hydroflow_graph.rs b/hydroflow_lang/src/graph/hydroflow_graph.rs index f868ebeb3fa..18de444060d 100644 --- a/hydroflow_lang/src/graph/hydroflow_graph.rs +++ b/hydroflow_lang/src/graph/hydroflow_graph.rs @@ -723,7 +723,7 @@ impl HydroflowGraph { (false, &GraphNode::Handoff { dst_span, .. }) => dst_span, (_, GraphNode::ModuleBoundary { .. }) => panic!(), }; - Ident::new(&*name, span) + Ident::new(&name, span) } /// For per-node singleton references. Helper to generate a deterministic `Ident` for the given node. @@ -802,9 +802,9 @@ impl HydroflowGraph { GraphNode::ModuleBoundary { .. } => panic!(), }) .map(|(node_id, (src_span, dst_span))| { - let ident_send = Ident::new(&*format!("hoff_{:?}_send", node_id.data()), dst_span); - let ident_recv = Ident::new(&*format!("hoff_{:?}_recv", node_id.data()), src_span); - let hoff_name = Literal::string(&*format!("handoff {:?}", node_id)); + let ident_send = Ident::new(&format!("hoff_{:?}_send", node_id.data()), dst_span); + let ident_recv = Ident::new(&format!("hoff_{:?}_recv", node_id.data()), src_span); + let hoff_name = Literal::string(&format!("handoff {:?}", node_id)); quote! { let (#ident_send, #ident_recv) = #hf.make_edge::<_, #root::scheduled::handoff::VecHandoff<_>>(#hoff_name); @@ -960,8 +960,8 @@ impl HydroflowGraph { op_span, ident: &ident, is_pull, - inputs: &*inputs, - outputs: &*outputs, + inputs: &inputs, + outputs: &outputs, singleton_output_ident, op_name, op_inst, @@ -1010,7 +1010,13 @@ impl HydroflowGraph { }) .ok(); - #[allow(clippy::unnecessary_literal_unwrap)] + #[cfg_attr( + not(feature = "diagnostics"), + expect( + clippy::unnecessary_literal_unwrap, + reason = "conditional compilation" + ) + )] let source_info = source_info.unwrap_or_else(|| { format!( "loc_nopath_{}_{}_{}_{}", @@ -1137,7 +1143,7 @@ impl HydroflowGraph { } }; - let hoff_name = Literal::string(&*format!("Subgraph {:?}", subgraph_id)); + let hoff_name = Literal::string(&format!("Subgraph {:?}", subgraph_id)); let stratum = Literal::usize_unsuffixed( self.subgraph_stratum.get(subgraph_id).cloned().unwrap_or(0), ); @@ -1171,11 +1177,11 @@ impl HydroflowGraph { }; let meta_graph_json = serde_json::to_string(&self).unwrap(); - let meta_graph_json = Literal::string(&*meta_graph_json); + let meta_graph_json = Literal::string(&meta_graph_json); let serde_diagnostics: Vec<_> = diagnostics.iter().map(Diagnostic::to_serde).collect(); let diagnostics_json = serde_json::to_string(&*serde_diagnostics).unwrap(); - let diagnostics_json = Literal::string(&*diagnostics_json); + let diagnostics_json = Literal::string(&diagnostics_json); quote! { { @@ -1338,7 +1344,7 @@ impl HydroflowGraph { } graph_write.write_node( node_id, - &*if write_config.op_short_text { + &if write_config.op_short_text { node.to_name_string() } else if write_config.op_text_no_imports { // Remove any lines that start with "use" (imports) @@ -1418,7 +1424,7 @@ impl HydroflowGraph { { assert!(!varname_node_ids.is_empty()); graph_write.write_varname( - &*varname.0.to_string(), + &varname.0.to_string(), varname_node_ids.into_iter(), Some(subgraph_id), )?; @@ -1427,9 +1433,9 @@ impl HydroflowGraph { graph_write.write_subgraph_end()?; } } else if !write_config.no_varnames { - for (varname, varname_node_ids) in varname_nodes.into_iter() { + for (varname, varname_node_ids) in varname_nodes { graph_write.write_varname( - &*varname.0.to_string(), + &varname.0.to_string(), varname_node_ids.into_iter(), None, )?; diff --git a/hydroflow_lang/src/graph/mod.rs b/hydroflow_lang/src/graph/mod.rs index 0050ded4a48..5caa4971cde 100644 --- a/hydroflow_lang/src/graph/mod.rs +++ b/hydroflow_lang/src/graph/mod.rs @@ -63,7 +63,7 @@ mod serde_syn { S: Serializer, T: quote::ToTokens, { - serializer.serialize_str(&*value.to_token_stream().to_string()) + serializer.serialize_str(&value.to_token_stream().to_string()) } pub fn deserialize<'de, D, T>(deserializer: D) -> Result @@ -72,7 +72,7 @@ mod serde_syn { T: syn::parse::Parse, { let s = String::deserialize(deserializer)?; - syn::parse_str(&*s).map_err(::custom) + syn::parse_str(&s).map_err(::custom) } } diff --git a/hydroflow_lang/src/graph/ops/map.rs b/hydroflow_lang/src/graph/ops/map.rs index 86d3805f21f..ed49fe48bbe 100644 --- a/hydroflow_lang/src/graph/ops/map.rs +++ b/hydroflow_lang/src/graph/ops/map.rs @@ -50,6 +50,7 @@ pub const MAP: OperatorConstraints = OperatorConstraints { let write_iterator = if is_pull { let input = &inputs[0]; quote_spanned! {op_span=> + #[allow(clippy::map_clone, reason = "hydroflow has no explicit `cloned`/`copied` operator")] let #ident = #input.map(#func); } } else { diff --git a/hydroflow_lang/src/graph/ops/mod.rs b/hydroflow_lang/src/graph/ops/mod.rs index a4102765e5b..bcf9f6e0578 100644 --- a/hydroflow_lang/src/graph/ops/mod.rs +++ b/hydroflow_lang/src/graph/ops/mod.rs @@ -379,7 +379,7 @@ impl WriteContextArgs<'_> { /// This will always return the same identifier for a given `suffix`. pub fn make_ident(&self, suffix: impl AsRef) -> Ident { Ident::new( - &*format!( + &format!( "sg_{:?}_node_{:?}_{}", self.subgraph_id.data(), self.node_id.data(), @@ -468,13 +468,17 @@ pub enum Persistence { /// Helper which creates a error message string literal for when the Tokio runtime is not found. fn make_missing_runtime_msg(op_name: &str) -> Literal { - Literal::string(&*format!("`{}()` must be used within a Tokio runtime. For example, use `#[hydroflow::main]` on your main method.", op_name)) + Literal::string(&format!("`{}()` must be used within a Tokio runtime. For example, use `#[hydroflow::main]` on your main method.", op_name)) } /// Operator categories, for docs. /// /// See source of [`Self::description`] for description of variants. -#[allow(missing_docs)] +#[allow( + clippy::allow_attributes, + missing_docs, + reason = "see `Self::description`" +)] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum OperatorCategory { Map, diff --git a/hydroflow_lang/src/graph/ops/py_udf.rs b/hydroflow_lang/src/graph/ops/py_udf.rs index 397f9248add..7b2bc0adb8f 100644 --- a/hydroflow_lang/src/graph/ops/py_udf.rs +++ b/hydroflow_lang/src/graph/ops/py_udf.rs @@ -84,7 +84,7 @@ pub const PY_UDF: OperatorConstraints = OperatorConstraints { let py_func_ident = wc.make_ident("py_func"); - let err_lit = Literal::string(&*format!( + let err_lit = Literal::string(&format!( "Hydroflow 'python' feature must be enabled to use `{}`", op_name )); diff --git a/hydroflow_lang/src/graph/ops/source_stdin.rs b/hydroflow_lang/src/graph/ops/source_stdin.rs index 27380185896..af5d8a17cc6 100644 --- a/hydroflow_lang/src/graph/ops/source_stdin.rs +++ b/hydroflow_lang/src/graph/ops/source_stdin.rs @@ -42,7 +42,7 @@ pub const SOURCE_STDIN: OperatorConstraints = OperatorConstraints { _| { let stream_ident = wc.make_ident("stream"); let write_prologue = quote_spanned! {op_span=> - #[allow(clippy::let_and_return)] + #[expect(clippy::let_and_return, reason = "gives return value a self-documenting name")] let mut #stream_ident = { use #root::tokio::io::AsyncBufReadExt; let reader = #root::tokio::io::BufReader::new(#root::tokio::io::stdin()); diff --git a/hydroflow_lang/src/lib.rs b/hydroflow_lang/src/lib.rs index 9b828d23dfc..91d06c49be0 100644 --- a/hydroflow_lang/src/lib.rs +++ b/hydroflow_lang/src/lib.rs @@ -5,8 +5,6 @@ feature = "diagnostics", feature(proc_macro_diagnostic, proc_macro_span) )] -#![allow(clippy::let_and_return)] -#![allow(clippy::explicit_auto_deref)] pub mod diagnostic; pub mod graph; pub mod parse; diff --git a/hydroflow_lang/src/parse.rs b/hydroflow_lang/src/parse.rs index 12c258d6e89..cca523c9b34 100644 --- a/hydroflow_lang/src/parse.rs +++ b/hydroflow_lang/src/parse.rs @@ -1,5 +1,5 @@ //! AST for surface syntax, modelled on [`syn`]'s ASTs. -#![allow(missing_docs)] +#![allow(clippy::allow_attributes, missing_docs, reason = "internal use")] use std::fmt::Debug; use std::hash::Hash; @@ -519,7 +519,7 @@ impl Parse for IndexInt { } impl ToTokens for IndexInt { fn to_tokens(&self, tokens: &mut TokenStream) { - let lit_int = LitInt::new(&*self.value.to_string(), self.span); + let lit_int = LitInt::new(&self.value.to_string(), self.span); lit_int.to_tokens(tokens) } } diff --git a/hydroflow_lang/src/union_find.rs b/hydroflow_lang/src/union_find.rs index a91c7822da0..cba6b7d2933 100644 --- a/hydroflow_lang/src/union_find.rs +++ b/hydroflow_lang/src/union_find.rs @@ -19,7 +19,6 @@ where K: Key, { /// Creates a new `UnionFind`, same as [`Default::default()`]. - #[allow(dead_code)] pub fn new() -> Self { Self::default() } diff --git a/hydroflow_macro/Cargo.toml b/hydroflow_macro/Cargo.toml index fbbd004fd8f..bf7f97434a8 100644 --- a/hydroflow_macro/Cargo.toml +++ b/hydroflow_macro/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_macro/" description = "Macro for using Hydroflow's Surface Syntax" +[lints] +workspace = true + [lib] proc-macro = true diff --git a/hydroflow_macro/src/lib.rs b/hydroflow_macro/src/lib.rs index 1d66dc65c78..eaf15571a7c 100644 --- a/hydroflow_macro/src/lib.rs +++ b/hydroflow_macro/src/lib.rs @@ -2,7 +2,6 @@ feature = "diagnostics", feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site) )] -#![allow(clippy::explicit_auto_deref)] use std::path::PathBuf; @@ -135,8 +134,8 @@ pub fn hydroflow_parser(input: proc_macro::TokenStream) -> proc_macro::TokenStre let part_graph = partition_graph(flat_graph).unwrap(); let part_mermaid = part_graph.to_mermaid(&Default::default()); - let lit0 = Literal::string(&*flat_mermaid); - let lit1 = Literal::string(&*part_mermaid); + let lit0 = Literal::string(&flat_mermaid); + let lit1 = Literal::string(&part_mermaid); return quote! { { @@ -158,7 +157,7 @@ pub fn surface_booktest_operators(input: proc_macro::TokenStream) -> proc_macro: let each = hydroflow_lang::graph::ops::OPERATORS.iter().map(|op| { let op_ident = Ident::new(op.name, Span::call_site()); let op_filename = format!("../../docs/docgen/{}.md", op.name); - let lit_filename = LitStr::new(&*op_filename, Span::call_site()); + let lit_filename = LitStr::new(&op_filename, Span::call_site()); quote! { #[doc = include_str!(#lit_filename)] mod #op_ident {} diff --git a/hydroflow_plus/Cargo.toml b/hydroflow_plus/Cargo.toml index dd82e5624f4..8eee4219ba8 100644 --- a/hydroflow_plus/Cargo.toml +++ b/hydroflow_plus/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/hydroflow_plus/" description = "Functional programming API for hydroflow" +[lints] +workspace = true + [lib] path = "src/lib.rs" diff --git a/hydroflow_plus/src/builder/mod.rs b/hydroflow_plus/src/builder/mod.rs index 92c930737e8..6cd4cb3209f 100644 --- a/hydroflow_plus/src/builder/mod.rs +++ b/hydroflow_plus/src/builder/mod.rs @@ -102,7 +102,10 @@ impl<'a> QuotedContext for FlowBuilder<'a> { } impl<'a> FlowBuilder<'a> { - #[allow(clippy::new_without_default)] + #[expect( + clippy::new_without_default, + reason = "call `new` explicitly, not `default`" + )] pub fn new() -> FlowBuilder<'a> { FlowBuilder { ir_leaves: Rc::new(RefCell::new(Some(Vec::new()))), diff --git a/hydroflow_plus/src/properties.rs b/hydroflow_plus/src/properties.rs index 5737528101f..82ff2ebd89a 100644 --- a/hydroflow_plus/src/properties.rs +++ b/hydroflow_plus/src/properties.rs @@ -22,7 +22,7 @@ pub struct PropertyDatabase { /// Allows us to convert the hydroflow datatype for folds to a binary operation for the algebra /// property tests. -#[allow(dead_code)] +#[allow(clippy::allow_attributes, dead_code, reason = "staged programming")] fn convert_hf_to_binary(f: F) -> impl Fn(I, I) -> A { move |a, b| { let mut acc = Default::default(); diff --git a/hydroflow_plus_test/Cargo.toml b/hydroflow_plus_test/Cargo.toml index 86990f9b03f..bc658936087 100644 --- a/hydroflow_plus_test/Cargo.toml +++ b/hydroflow_plus_test/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [features] default = ["stageleft_devel"] stageleft_devel = [] diff --git a/hydroflow_plus_test/src/cluster/paxos.rs b/hydroflow_plus_test/src/cluster/paxos.rs index acdd617c83d..9deb18345c1 100644 --- a/hydroflow_plus_test/src/cluster/paxos.rs +++ b/hydroflow_plus_test/src/cluster/paxos.rs @@ -79,7 +79,7 @@ struct P2b { // Important: By convention, all relations that represent booleans either have a single "true" value or nothing. // This allows us to use the continue_if_exists() and continue_if_empty() operators as if they were if (true) and if (false) statements. -#[allow(clippy::too_many_arguments)] +#[expect(clippy::too_many_arguments, reason = "internal paxos code // TODO")] pub fn paxos( flow: &FlowBuilder<'_>, f: usize, @@ -218,7 +218,7 @@ pub fn paxos( (proposers, acceptors, clients, replicas) } -#[allow(clippy::type_complexity)] +#[expect(clippy::type_complexity, reason = "internal paxos code // TODO")] fn acceptor<'a>( flow: &FlowBuilder<'a>, p_to_acceptors_p1a: Stream<'a, P1a, Unbounded, NoTick, Cluster>, @@ -433,7 +433,11 @@ fn p_p2b<'a>( } // Proposer logic to send p2as, outputting the next slot and the p2as to send to acceptors. -#[allow(clippy::type_complexity, clippy::too_many_arguments)] +#[expect( + clippy::type_complexity, + clippy::too_many_arguments, + reason = "internal paxos code // TODO" +)] fn p_p2a<'a>( flow: &FlowBuilder<'a>, proposers: &Cluster, @@ -506,7 +510,7 @@ fn p_p2a<'a>( } // Proposer logic for processing p1bs, determining if the proposer is now the leader, which uncommitted messages to commit, what the maximum slot is in the p1bs, and which no-ops to commit to fill log holes. -#[allow(clippy::type_complexity)] +#[expect(clippy::type_complexity, reason = "internal paxos code // TODO")] fn p_p1b<'a>( flow: &FlowBuilder<'a>, proposers: &Cluster, @@ -606,7 +610,7 @@ fn p_p1b<'a>( } // Replicas. All relations for replicas will be prefixed with r. Expects ReplicaPayload on p_to_replicas, outputs a stream of (client address, ReplicaPayload) after processing. -#[allow(clippy::type_complexity)] +#[expect(clippy::type_complexity, reason = "internal paxos code // TODO")] fn replica<'a>( flow: &FlowBuilder<'a>, replicas: &Cluster, @@ -887,7 +891,6 @@ fn client<'a, B: Address + Ord + std::fmt::Debug + Clone>( } }), ); - c_stats_output_timer .cross_singleton(c_latencies) .cross_singleton(c_throughput) @@ -934,7 +937,7 @@ fn p_max_ballot<'a>( } // Proposer logic to calculate the next ballot number. Expects p_received_max_ballot, the largest ballot received so far. Outputs streams: ballot_num, and has_largest_ballot, which only contains a value if we have the largest ballot. -#[allow(clippy::type_complexity)] +#[expect(clippy::type_complexity, reason = "internal paxos code // TODO")] fn p_ballot_calc<'a>( flow: &FlowBuilder<'a>, proposers: &Cluster, @@ -980,7 +983,11 @@ fn p_ballot_calc<'a>( } // Proposer logic to send "I am leader" messages periodically to other proposers, or send p1a to acceptors if other leaders expired. -#[allow(clippy::too_many_arguments, clippy::type_complexity)] +#[expect( + clippy::too_many_arguments, + clippy::type_complexity, + reason = "internal paxos code // TODO" +)] fn p_p1a<'a>( p_ballot_num: Singleton<'a, u32, Bounded, Tick, Cluster>, p_is_leader: Optional<'a, bool, Bounded, Tick, Cluster>, diff --git a/hydroflow_plus_test_local/Cargo.toml b/hydroflow_plus_test_local/Cargo.toml index 518ce48f47c..b38ed516dfa 100644 --- a/hydroflow_plus_test_local/Cargo.toml +++ b/hydroflow_plus_test_local/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [features] stageleft_devel = [] diff --git a/hydroflow_plus_test_local_macro/Cargo.toml b/hydroflow_plus_test_local_macro/Cargo.toml index 70d0a455811..67427cf11a0 100644 --- a/hydroflow_plus_test_local_macro/Cargo.toml +++ b/hydroflow_plus_test_local_macro/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [lib] proc-macro = true path = "../hydroflow_plus_test_local/src/lib.rs" diff --git a/lattices/Cargo.toml b/lattices/Cargo.toml index b1af708dc5d..b4daacad7ee 100644 --- a/lattices/Cargo.toml +++ b/lattices/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/lattices/" description = "Lattice data types for simplifying distributed state by providing associativity, commutativity, and idempotence." +[lints] +workspace = true + [features] default = [] serde = ["dep:serde"] diff --git a/lattices/src/collections.rs b/lattices/src/collections.rs index da5df7351c4..13494e6fe91 100644 --- a/lattices/src/collections.rs +++ b/lattices/src/collections.rs @@ -859,8 +859,6 @@ where Q: Eq + ?Sized, { fn get_key_value(&self, key: &'a Q) -> Option<(Self::KeyRef<'_>, Self::ItemRef<'_>)> { - // TODO(mingwei): https://github.com/rust-lang/rust-clippy/issues/11764 - #[allow(clippy::map_identity)] self.0 .as_ref() .filter(|(k, _v)| key == k.borrow()) @@ -897,8 +895,6 @@ impl MapIter for OptionMap { Self: 'a; fn iter(&self) -> Self::Iter<'_> { - // TODO(mingwei): https://github.com/rust-lang/rust-clippy/issues/11764 - #[allow(clippy::map_identity)] self.0.as_ref().map(|(k, v)| (k, v)).into_iter() } } diff --git a/lattices/src/semiring_application.rs b/lattices/src/semiring_application.rs index 255a8fdfaba..c3d12eef5b8 100644 --- a/lattices/src/semiring_application.rs +++ b/lattices/src/semiring_application.rs @@ -52,7 +52,6 @@ impl One for BinaryTrust { } } -#[allow(dead_code)] /// Implementation of the Multiplicity semiring (N, +, *, 0, 1) pub struct Multiplicity(u32); @@ -104,7 +103,6 @@ pub enum U32WithInfinity { Finite(u32), } -#[allow(dead_code)] /// Implementation of the Cost/Tropical semiring (N U Inf, min, +, inf, 0) pub struct Cost(U32WithInfinity); @@ -159,7 +157,6 @@ impl One for Cost { } } -#[allow(dead_code)] /// Implementation of the confidence Score semiring ([0, 1], max, *, 0, 1) pub struct ConfidenceScore(f64); @@ -204,7 +201,6 @@ impl One for ConfidenceScore { } } -#[allow(dead_code)] /// Implementation of Fuzzy Logic semiring ([0, 1], max, min, 0, 1). pub struct FuzzyLogic(f64); diff --git a/lattices/src/test.rs b/lattices/src/test.rs index d35505405e8..2b2068906c4 100644 --- a/lattices/src/test.rs +++ b/lattices/src/test.rs @@ -30,8 +30,11 @@ pub fn check_lattice_ord(items: &[T]) { } /// Checks `PartialOrd` and `PartialEq`'s reflexivity, symmetry, transitivity, and duality. -#[allow(clippy::eq_op)] -#[allow(clippy::double_comparisons)] +#[expect( + clippy::eq_op, + clippy::double_comparisons, + reason = "testing comparison properties" +)] pub fn check_partial_ord_properties(items: &[T]) { use std::cmp::Ordering::*; @@ -83,7 +86,7 @@ pub fn check_partial_ord_properties(items: &[ assert_eq!(a >= b, a > b || a == b, "`{:?}`, `{:?}`", a, b); // PartialEq: // a != b if and only if !(a == b). - #[allow(clippy::nonminimal_bool)] + // #[expect(clippy::nonminimal_bool, reason = "testing comparison properties")] { assert_eq!(a != b, !(a == b), "`{:?}`, `{:?}`", a, b); } diff --git a/lattices/src/union_find.rs b/lattices/src/union_find.rs index 57235acc88b..6e4aef0ac0e 100644 --- a/lattices/src/union_find.rs +++ b/lattices/src/union_find.rs @@ -130,7 +130,7 @@ where { fn merge(&mut self, other: UnionFind) -> bool { let mut changed = false; - for (item, parent) in other.0.into_iter() { + for (item, parent) in other.0 { // Do not short circuit. changed |= self.union(item, parent.get()).into_reveal(); } diff --git a/lattices/tests/macro.rs b/lattices/tests/macro.rs index f8ec7d09f88..4afab0b382f 100644 --- a/lattices/tests/macro.rs +++ b/lattices/tests/macro.rs @@ -12,7 +12,7 @@ type RowVal = Max; macro_rules! test_derive_all { ( $( $m:ident => $i:ident, )* ) => { $( - #[allow(dead_code)] + #[allow(clippy::allow_attributes, dead_code, reason = "compilation test code")] mod $m { use super::*; diff --git a/lattices_macro/Cargo.toml b/lattices_macro/Cargo.toml index 4217ef22eec..7daa0714017 100644 --- a/lattices_macro/Cargo.toml +++ b/lattices_macro/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/lattices/" description = "Procedural macros for the `lattices` crate." +[lints] +workspace = true + [lib] proc-macro = true diff --git a/multiplatform_test/Cargo.toml b/multiplatform_test/Cargo.toml index 1e1f437f2f5..cccc85ec4c1 100644 --- a/multiplatform_test/Cargo.toml +++ b/multiplatform_test/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/multiplatform_test/" description = "A simple attribute macro to combine `#[test]` and `#[wasm_bindgen_test]`" +[lints] +workspace = true + [lib] proc-macro = true diff --git a/multiplatform_test/README.md b/multiplatform_test/README.md index 95faebd2fe8..3d69f347551 100644 --- a/multiplatform_test/README.md +++ b/multiplatform_test/README.md @@ -17,7 +17,7 @@ fn my_test() { Expands to -```rust +```rust,no_run #[test] #[wasm_bindgen_test::wasm_bindgen_test] fn my_test() { @@ -61,7 +61,7 @@ fn my_test() { expands to -```rust +```rust,no_run use multiplatform_test::multiplatform_test; #[test] diff --git a/multiplatform_test/src/lib.rs b/multiplatform_test/src/lib.rs index ee89d7fe18c..1a1b019cf52 100644 --- a/multiplatform_test/src/lib.rs +++ b/multiplatform_test/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::test_attr_in_doctest)] #![doc = include_str!("../README.md")] use proc_macro::TokenStream; diff --git a/pusherator/Cargo.toml b/pusherator/Cargo.toml index be31e716bf9..4c454c1f061 100644 --- a/pusherator/Cargo.toml +++ b/pusherator/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/pusherator/" description = "Push-based version of Rust iterators" +[lints] +workspace = true + [features] default = [ "demux" ] demux = [ "dep:variadics" ] diff --git a/relalg/Cargo.toml b/relalg/Cargo.toml index 0350ca4fde4..e7c6edba331 100644 --- a/relalg/Cargo.toml +++ b/relalg/Cargo.toml @@ -5,6 +5,9 @@ version = "0.0.0" edition = "2021" license = "Apache-2.0" +[lints] +workspace = true + [dependencies] anyhow = "1.0.82" datadriven = "0.6.0" diff --git a/relalg/src/codegen.rs b/relalg/src/codegen.rs index 2851958fbb2..1981f7e384a 100644 --- a/relalg/src/codegen.rs +++ b/relalg/src/codegen.rs @@ -81,7 +81,7 @@ impl SubgraphBuilder { } RelExpr::Filter(preds, input) => { let op_name = self.gensym("filter"); - let input_name = self.compile_op(&**input); + let input_name = self.compile_op(input); let pred = quote! { #(#preds.eval(row).is_true())&&* @@ -95,7 +95,7 @@ impl SubgraphBuilder { } RelExpr::Project(exprs, input) => { let op_name = self.gensym("project"); - let input_name = self.compile_op(&**input); + let input_name = self.compile_op(input); let pred = quote! { vec![ #(#exprs.eval(&row)),* ] diff --git a/relalg/src/lib.rs b/relalg/src/lib.rs index a6b13bd2b21..326b32e7371 100644 --- a/relalg/src/lib.rs +++ b/relalg/src/lib.rs @@ -1,6 +1,5 @@ -#![allow(dead_code)] -#![allow(clippy::iter_with_drain)] -#![allow(clippy::explicit_auto_deref)] +#![allow(clippy::allow_attributes, dead_code, reason = "deprecated code")] + use anyhow::bail; use sexp::Sexp; diff --git a/relalg/src/runtime.rs b/relalg/src/runtime.rs index 6681bbc2fc1..3bedaa97b7d 100644 --- a/relalg/src/runtime.rs +++ b/relalg/src/runtime.rs @@ -1,5 +1,3 @@ -#![allow(dead_code)] - use std::cell::RefCell; use std::rc::Rc; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d8830bc1e45..f85aaf4fbdf 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-06-17" +channel = "nightly-2024-09-05" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown", "x86_64-unknown-linux-musl"] diff --git a/stageleft/Cargo.toml b/stageleft/Cargo.toml index e8fa4483b0e..d58e1bfa18f 100644 --- a/stageleft/Cargo.toml +++ b/stageleft/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/stageleft/" description = "Type-safe staged programming for Rust" +[lints] +workspace = true + [lib] path = "src/lib.rs" diff --git a/stageleft/src/lib.rs b/stageleft/src/lib.rs index 6cc54fdb0ce..ff23a4c4963 100644 --- a/stageleft/src/lib.rs +++ b/stageleft/src/lib.rs @@ -57,7 +57,12 @@ macro_rules! stageleft_crate { #[cfg(not(feature = "stageleft_devel"))] #[cfg(not(stageleft_macro))] #[doc(hidden)] - #[allow(unused, ambiguous_glob_reexports, clippy::suspicious_else_formatting)] + #[allow( + unused, + ambiguous_glob_reexports, + clippy::suspicious_else_formatting, + reason = "generated code" + )] pub mod __staged { include!(concat!( env!("OUT_DIR"), @@ -73,7 +78,12 @@ macro_rules! stageleft_no_entry_crate { () => { #[cfg(not(feature = "stageleft_devel"))] #[doc(hidden)] - #[allow(unused, ambiguous_glob_reexports, clippy::suspicious_else_formatting)] + #[allow( + unused, + ambiguous_glob_reexports, + clippy::suspicious_else_formatting, + reason = "generated code" + )] pub mod __staged { include!(concat!( env!("OUT_DIR"), diff --git a/stageleft/src/runtime_support.rs b/stageleft/src/runtime_support.rs index 70bea1b549e..cdca23ec078 100644 --- a/stageleft/src/runtime_support.rs +++ b/stageleft/src/runtime_support.rs @@ -81,7 +81,7 @@ pub trait FreeVariable { Self: Sized; fn uninitialized(&self) -> O { - #[allow(clippy::uninit_assumed_init)] + #[expect(clippy::uninit_assumed_init, reason = "this code should never run")] unsafe { MaybeUninit::uninit().assume_init() } diff --git a/stageleft_macro/Cargo.toml b/stageleft_macro/Cargo.toml index 55e09f4cf7b..6912ac8471f 100644 --- a/stageleft_macro/Cargo.toml +++ b/stageleft_macro/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/stageleft_macro/" description = "Helper macros for the stageleft crate" +[lints] +workspace = true + [lib] proc-macro = true path = "src/lib.rs" diff --git a/stageleft_test/Cargo.toml b/stageleft_test/Cargo.toml index 9e4c659e093..ef0f6b0113b 100644 --- a/stageleft_test/Cargo.toml +++ b/stageleft_test/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [features] stageleft_devel = [] diff --git a/stageleft_test/src/lib.rs b/stageleft_test/src/lib.rs index eddd7f1158d..d7f1982ed44 100644 --- a/stageleft_test/src/lib.rs +++ b/stageleft_test/src/lib.rs @@ -29,7 +29,7 @@ fn raise_to_power(_ctx: BorrowBounds<'_>, value: RuntimeData, power: u32) - fn closure_capture_lifetime<'a, I: Copy + Into + 'a>( _ctx: BorrowBounds<'a>, v: RuntimeData, -) -> impl Quoted u32 + 'a>> { +) -> impl Quoted<'a, Box u32 + 'a>> { q!(Box::new(move || { v.into() }) as Box u32 + 'a>) } diff --git a/stageleft_test/src/submodule.rs b/stageleft_test/src/submodule.rs index 82358573ba0..56025e59120 100644 --- a/stageleft_test/src/submodule.rs +++ b/stageleft_test/src/submodule.rs @@ -8,7 +8,7 @@ pub struct PublicStruct { // TODO(shadaj): right now, public structs must have public fields // because otherwise they may not be visible at splice time. // This should be documented and ideally have some tooling support. - #[allow(dead_code)] + #[allow(clippy::allow_attributes, dead_code, reason = "// TODO(shadaj)")] pub a: u32, } diff --git a/stageleft_test_macro/Cargo.toml b/stageleft_test_macro/Cargo.toml index 42019dd2e70..f576ae78d02 100644 --- a/stageleft_test_macro/Cargo.toml +++ b/stageleft_test_macro/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [lib] proc-macro = true path = "../stageleft_test/src/lib.rs" diff --git a/stageleft_tool/Cargo.toml b/stageleft_tool/Cargo.toml index 7f5eef23962..bcaae60d8f7 100644 --- a/stageleft_tool/Cargo.toml +++ b/stageleft_tool/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/stageleft_macro/" description = "Helper macros for the stageleft crate" +[lints] +workspace = true + [lib] path = "src/lib.rs" diff --git a/stageleft_tool/src/lib.rs b/stageleft_tool/src/lib.rs index 3d710958f25..217b155e4ce 100644 --- a/stageleft_tool/src/lib.rs +++ b/stageleft_tool/src/lib.rs @@ -72,7 +72,7 @@ pub fn gen_macro(staged_path: &Path, crate_name: &str) { let proc_macro_wrapper: syn::ItemFn = parse_quote!( #[proc_macro] - #[allow(non_snake_case, unused_qualifications)] + #[expect(unused_qualifications, reason = "generated code")] pub fn #underscored_path(input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStream { let input = ::stageleft::internal::TokenStream::from(input); let out = #exported_from_parsed::#underscored_path_impl(input); diff --git a/topolotree/Cargo.toml b/topolotree/Cargo.toml index 6cd24e5dcb0..030887fa71e 100644 --- a/topolotree/Cargo.toml +++ b/topolotree/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [[bin]] name = "topolotree" path = "src/main.rs" diff --git a/variadics/Cargo.toml b/variadics/Cargo.toml index 13810a1d1ee..0871e76a213 100644 --- a/variadics/Cargo.toml +++ b/variadics/Cargo.toml @@ -7,6 +7,9 @@ license = "Apache-2.0" documentation = "https://docs.rs/variadics/" description = "Variadic generics on stable Rust using tuple lists" +[lints] +workspace = true + [dependencies] sealed = "0.5.0" diff --git a/variadics/src/lib.rs b/variadics/src/lib.rs index 1bf827f9e17..548cbf1d153 100644 --- a/variadics/src/lib.rs +++ b/variadics/src/lib.rs @@ -628,13 +628,12 @@ mod test { type MyList = var_type!(u8, u16, u32, u64); type MyPrefix = var_type!(u8, u16); + #[expect(dead_code, reason = "compilation test code")] type MySuffix = >::Suffix; - #[allow(dead_code)] const _: MySuffix = var_expr!(0_u32, 0_u64); #[test] - #[allow(clippy::let_unit_value)] fn test_basic_expr() { let _ = var_expr!(); let _ = var_expr!(1); @@ -645,7 +644,7 @@ mod test { variadic_trait! { /// Variaidic list of futures. - #[allow(dead_code)] + #[allow(clippy::allow_attributes, dead_code, reason = "compilation test code")] pub variadic FuturesList where F: std::future::Future {} } diff --git a/website_playground/Cargo.toml b/website_playground/Cargo.toml index b985fd2db4d..ac99a8c695e 100644 --- a/website_playground/Cargo.toml +++ b/website_playground/Cargo.toml @@ -4,6 +4,9 @@ publish = false version = "0.0.0" edition = "2021" +[lints] +workspace = true + [lib] crate-type = ["cdylib", "rlib"]