Skip to content

add indirection so generated code passes clippy and still works on ru… #1472

add indirection so generated code passes clippy and still works on ru…

add indirection so generated code passes clippy and still works on ru… #1472

Triggered via push July 2, 2025 09:51
Status Success
Total duration 6m 11s
Artifacts

ci.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
type parameter `T` goes unused in function definition: target/debug/build/pubsub-bd857a2a542dc270/out/pubsub_capnp.rs#L625
warning: type parameter `T` goes unused in function definition --> /home/runner/work/capnproto-rust/capnproto-rust/target/debug/build/pubsub-bd857a2a542dc270/out/pubsub_capnp.rs:625:30 | 625 | pub fn get_field_types<T>(index: u16) -> ::capnp::introspect::Type where T: ::capnp::traits::Owned { | ^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
type parameter `T` goes unused in function definition: target/debug/build/pubsub-bd857a2a542dc270/out/pubsub_capnp.rs#L412
warning: type parameter `T` goes unused in function definition --> /home/runner/work/capnproto-rust/capnproto-rust/target/debug/build/pubsub-bd857a2a542dc270/out/pubsub_capnp.rs:412:35 | 412 | pub fn get_annotation_types<T>(child_index: Option<u16>, index: u32) -> ::capnp::introspect::Type where T: ::capnp::traits::Owned { | ^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default
this match could be replaced by its body itself: target/debug/build/pubsub-bd857a2a542dc270/out/pubsub_capnp.rs#L87
warning: this match could be replaced by its body itself --> /home/runner/work/capnproto-rust/capnproto-rust/target/debug/build/pubsub-bd857a2a542dc270/out/pubsub_capnp.rs:87:7 | 87 | / match method_id { 88 | | _ => { ::capnp::capability::DispatchCallResult::new(::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not i... 89 | | } | |_______^ help: consider using the match body instead: `::capnp::capability::DispatchCallResult::new(::capnp::capability::Promise::err(::capnp::Error::unimplemented("Method not implemented.".to_string())), false)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_single_binding = note: `#[warn(clippy::match_single_binding)]` on by default
type parameter `T` goes unused in function definition: target/debug/build/fill_random_values-4180ece655a1aee2/out/fill_capnp.rs#L2434
warning: type parameter `T` goes unused in function definition --> /home/runner/work/capnproto-rust/capnproto-rust/target/debug/build/fill_random_values-4180ece655a1aee2/out/fill_capnp.rs:2434:33 | 2434 | pub fn get_annotation_types<T>(child_index: Option<u16>, index: u32) -> ::capnp::introspect::Type where T: ::capnp::traits::Owned { | ^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
type parameter `T` goes unused in function definition: target/debug/build/fill_random_values-4180ece655a1aee2/out/fill_capnp.rs#L2431
warning: type parameter `T` goes unused in function definition --> /home/runner/work/capnproto-rust/capnproto-rust/target/debug/build/fill_random_values-4180ece655a1aee2/out/fill_capnp.rs:2431:28 | 2431 | pub fn get_field_types<T>(index: u16) -> ::capnp::introspect::Type where T: ::capnp::traits::Owned { | ^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters = note: `#[warn(clippy::extra_unused_type_parameters)]` on by default
variables can be used directly in the `format!` string: capnpc/src/codegen.rs#L3064
warning: variables can be used directly in the `format!` string --> capnpc/src/codegen.rs:3064:22 | 3064 | Line(format!("pub mod {} {{", last_name)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3064 - Line(format!("pub mod {} {{", last_name)), 3064 + Line(format!("pub mod {last_name} {{")), |
variables can be used directly in the `format!` string: capnpc/src/codegen.rs#L3054
warning: variables can be used directly in the `format!` string --> capnpc/src/codegen.rs:3054:32 | 3054 | interior.push(Line(format!("pub const ID: u64 = 0x{:x};", node_id))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 3054 - interior.push(Line(format!("pub const ID: u64 = 0x{:x};", node_id))); 3054 + interior.push(Line(format!("pub const ID: u64 = 0x{node_id:x};"))); |
variables can be used directly in the `format!` string: capnpc/src/codegen.rs#L2517
warning: variables can be used directly in the `format!` string --> capnpc/src/codegen.rs:2517:22 | 2517 | Line(format!("mod {} {{", name_as_mod)), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 2517 - Line(format!("mod {} {{", name_as_mod)), 2517 + Line(format!("mod {name_as_mod} {{")), |
variables can be used directly in the `format!` string: capnpc/src/codegen.rs#L1726
warning: variables can be used directly in the `format!` string --> capnpc/src/codegen.rs:1726:17 | 1726 | Ok(Line(format!("({child_index:?}, {index}) => {}(),", func))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args help: change this to | 1726 - Ok(Line(format!("({child_index:?}, {index}) => {}(),", func))) 1726 + Ok(Line(format!("({child_index:?}, {index}) => {func}(),"))) |
variables can be used directly in the `format!` string: capnpc/src/codegen.rs#L746
warning: variables can be used directly in the `format!` string --> capnpc/src/codegen.rs:746:17 | 746 | format!("Option<{}>", inner_type) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `#[warn(clippy::uninlined_format_args)]` on by default help: change this to | 746 - format!("Option<{}>", inner_type) 746 + format!("Option<{inner_type}>") |