Skip to content

fix: remove dependency on derivative (#294) #813

fix: remove dependency on derivative (#294)

fix: remove dependency on derivative (#294) #813

Triggered via push January 3, 2025 03:23
Status Success
Total duration 8m 14s
Artifacts

ci.yaml

on: push
Matrix: lint
CI is green
0s
CI is green
Fit to window
Zoom out
Zoom in

Annotations

40 warnings
unused import: `pilota::prost::Message as _`: examples/src/lib.rs#L1
warning: unused import: `pilota::prost::Message as _` --> examples/src/lib.rs:1:5 | 1 | use pilota::prost::Message as _; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this function has too many arguments (8/7): pilota-build/src/middle/context.rs#L319
warning: this function has too many arguments (8/7) --> pilota-build/src/middle/context.rs:319:5 | 319 | / pub(crate) fn build( 320 | | self, 321 | | services: Arc<[crate::IdlService]>, 322 | | source_type: SourceType, ... | 327 | | split: bool, 328 | | ) -> Context { | |________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
unnecessary use of `first().is_some()` to check if slice is not empty: pilota-build/src/codegen/pkg_tree.rs#L26
warning: unnecessary use of `first().is_some()` to check if slice is not empty --> pilota-build/src/codegen/pkg_tree.rs:26:21 | 26 | .filter(|p| p.first().is_some()) | ^^^^^^^^^^^^^^^^^^^ help: replace this with: `!p.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check
unnecessary use of `first().is_some()` to check if slice is not empty: pilota-build/src/codegen/pkg_tree.rs#L17
warning: unnecessary use of `first().is_some()` to check if slice is not empty --> pilota-build/src/codegen/pkg_tree.rs:17:31 | 17 | if pkgs.iter().filter(|p| p.first().is_some()).count() == 0 { | ^^^^^^^^^^^^^^^^^^^ help: replace this with: `!p.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_first_then_check = note: `#[warn(clippy::unnecessary_first_then_check)]` on by default
struct `ExceptionVariant` is never constructed: pilota-build/src/ir/mod.rs#L60
warning: struct `ExceptionVariant` is never constructed --> pilota-build/src/ir/mod.rs:60:12 | 60 | pub struct ExceptionVariant { | ^^^^^^^^^^^^^^^^ | = note: `ExceptionVariant` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
method `increment_by` is never used: pilota-build/src/index.rs#L14
warning: method `increment_by` is never used --> pilota-build/src/index.rs:14:8 | 3 | pub trait Idx: Sized + Copy + 'static { | --- method in this trait ... 14 | fn increment_by(&mut self, amount: usize) { | ^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
the following explicit lifetimes could be elided: 'a: pilota/src/thrift/binary_unsafe.rs#L907
warning: the following explicit lifetimes could be elided: 'a --> pilota/src/thrift/binary_unsafe.rs:907:6 | 907 | impl<'a> TInputProtocol for TBinaryUnsafeInputProtocol<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 907 - impl<'a> TInputProtocol for TBinaryUnsafeInputProtocol<'a> { 907 + impl TInputProtocol for TBinaryUnsafeInputProtocol<'_> { |
the following explicit lifetimes could be elided: 'a: pilota/src/thrift/binary_unsafe.rs#L766
warning: the following explicit lifetimes could be elided: 'a --> pilota/src/thrift/binary_unsafe.rs:766:6 | 766 | impl<'a> TLengthProtocol for TBinaryUnsafeInputProtocol<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 766 - impl<'a> TLengthProtocol for TBinaryUnsafeInputProtocol<'a> { 766 + impl TLengthProtocol for TBinaryUnsafeInputProtocol<'_> { |
usage of a legacy numeric method: pilota/src/prost/mod.rs#L67
warning: usage of a legacy numeric method --> pilota/src/prost/mod.rs:67:24 | 67 | if length > usize::max_value() as u64 { | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants help: use the associated constant instead | 67 | if length > usize::MAX as u64 { | ~~~
the following explicit lifetimes could be elided: 'a: pilota/src/prost/encoding.rs#L955
warning: the following explicit lifetimes could be elided: 'a --> pilota/src/prost/encoding.rs:955:18 | 955 | impl<'a> Drop for DropGuard<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 955 - impl<'a> Drop for DropGuard<'a> { 955 + impl Drop for DropGuard<'_> { |
importing legacy numeric constants: pilota/src/prost/encoding.rs#L9
warning: importing legacy numeric constants --> pilota/src/prost/encoding.rs:9:55 | 9 | use core::{cmp::min, convert::TryFrom, mem, str, u32, usize}; | ^^^^^ | = help: remove this import = note: then `usize::<CONST>` will resolve to the respective associated constant = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
importing legacy numeric constants: pilota/src/prost/encoding.rs#L9
warning: importing legacy numeric constants --> pilota/src/prost/encoding.rs:9:50 | 9 | use core::{cmp::min, convert::TryFrom, mem, str, u32, usize}; | ^^^ | = help: remove this import = note: then `u32::<CONST>` will resolve to the respective associated constant = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
importing legacy numeric constants: pilota/src/prost/message.rs#L4
warning: importing legacy numeric constants --> pilota/src/prost/message.rs:4:24 | 4 | use core::{fmt::Debug, usize}; | ^^^^^ | = help: remove this import = note: then `usize::<CONST>` will resolve to the respective associated constant = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
value assigned to `skip_default_value` is never read: pilota/src/prost/encoding.rs#L1661
warning: value assigned to `skip_default_value` is never read --> pilota/src/prost/encoding.rs:1661:21 | 1661 | let mut skip_default_value = true; | ^^^^^^^^^^^^^^^^^^ ... 1693 | map!(BTreeMap); | -------------- in this macro invocation | = help: maybe it is overwritten before being read? = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
value assigned to `skip_val` is never read: pilota/src/prost/encoding.rs#L1583
warning: value assigned to `skip_val` is never read --> pilota/src/prost/encoding.rs:1583:25 | 1583 | let mut skip_val = val == val_default; | ^^^^^^^^ ... 1693 | map!(BTreeMap); | -------------- in this macro invocation | = help: maybe it is overwritten before being read? = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
value assigned to `skip_key` is never read: pilota/src/prost/encoding.rs#L1582
warning: value assigned to `skip_key` is never read --> pilota/src/prost/encoding.rs:1582:25 | 1582 | let mut skip_key = key == &K::default(); | ^^^^^^^^ ... 1693 | map!(BTreeMap); | -------------- in this macro invocation | = help: maybe it is overwritten before being read? = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
value assigned to `skip_default_value` is never read: pilota/src/prost/encoding.rs#L1661
warning: value assigned to `skip_default_value` is never read --> pilota/src/prost/encoding.rs:1661:21 | 1661 | let mut skip_default_value = true; | ^^^^^^^^^^^^^^^^^^ ... 1689 | map!(AHashMap); | -------------- in this macro invocation | = help: maybe it is overwritten before being read? = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
value assigned to `skip_val` is never read: pilota/src/prost/encoding.rs#L1583
warning: value assigned to `skip_val` is never read --> pilota/src/prost/encoding.rs:1583:25 | 1583 | let mut skip_val = val == val_default; | ^^^^^^^^ ... 1689 | map!(AHashMap); | -------------- in this macro invocation | = help: maybe it is overwritten before being read? = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
value assigned to `skip_key` is never read: pilota/src/prost/encoding.rs#L1582
warning: value assigned to `skip_key` is never read --> pilota/src/prost/encoding.rs:1582:25 | 1582 | let mut skip_key = key == &K::default(); | ^^^^^^^^ ... 1689 | map!(AHashMap); | -------------- in this macro invocation | = help: maybe it is overwritten before being read? = note: `#[warn(unused_assignments)]` on by default = note: this warning originates in the macro `map` (in Nightly builds, run with -Z macro-backtrace for more info)
operator precedence can trip the unwary: pilota/src/thrift/compact.rs#L1495
warning: operator precedence can trip the unwary --> pilota/src/thrift/compact.rs:1495:21 | 1495 | / (tcompact_get_compact(identifier.key_type).unwrap() as u8) << 4 1496 | | | (tcompact_get_compact(identifier.value_type).unwrap()) as u8, | |______________________________________________________________________________________^ help: consider parenthesizing your expression: `((tcompact_get_compact(identifier.key_type).unwrap() as u8) << 4) | (tcompact_get_compact(identifier.value_type).unwrap()) as u8` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
operator precedence can trip the unwary: pilota/src/thrift/compact.rs#L932
warning: operator precedence can trip the unwary --> pilota/src/thrift/compact.rs:932:17 | 932 | / (tcompact_get_compact(identifier.key_type)? as u8) << 4 933 | | | (tcompact_get_compact(identifier.value_type)?) as u8, | |__________________________________________________________________________^ help: consider parenthesizing your expression: `((tcompact_get_compact(identifier.key_type)? as u8) << 4) | (tcompact_get_compact(identifier.value_type)?) as u8` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
operator precedence can trip the unwary: pilota/src/thrift/compact.rs#L647
warning: operator precedence can trip the unwary --> pilota/src/thrift/compact.rs:647:17 | 647 | / (tcompact_get_compact(identifier.key_type)? as u8) << 4 648 | | | (tcompact_get_compact(identifier.value_type)?) as u8, | |__________________________________________________________________________^ help: consider parenthesizing your expression: `((tcompact_get_compact(identifier.key_type)? as u8) << 4) | (tcompact_get_compact(identifier.value_type)?) as u8` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
operator precedence can trip the unwary: pilota/src/thrift/compact.rs#L377
warning: operator precedence can trip the unwary --> pilota/src/thrift/compact.rs:377:21 | 377 | / (tcompact_get_compact(identifier.key_type).unwrap() as u8) << 4 378 | | | (tcompact_get_compact(identifier.value_type).unwrap()) as u8, | |______________________________________________________________________________________^ help: consider parenthesizing your expression: `((tcompact_get_compact(identifier.key_type).unwrap() as u8) << 4) | (tcompact_get_compact(identifier.value_type).unwrap()) as u8` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence = note: `#[warn(clippy::precedence)]` on by default
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L246
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:246:11 | 246 | #[cfg(feature = "no-recursion-limit")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L236
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:236:15 | 236 | #[cfg(not(feature = "no-recursion-limit"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L225
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:225:11 | 225 | #[cfg(feature = "no-recursion-limit")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L217
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:217:15 | 217 | #[cfg(not(feature = "no-recursion-limit"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L196
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:196:15 | 196 | #[cfg(not(feature = "no-recursion-limit"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L200
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:200:11 | 200 | #[cfg(not(feature = "no-recursion-limit"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/encoding.rs#L188
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/encoding.rs:188:12 | 188 | #[cfg_attr(feature = "no-recursion-limit", derive(Default))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `prost-derive`: pilota/src/prost/mod.rs#L83
warning: unexpected `cfg` condition value: `prost-derive` --> pilota/src/prost/mod.rs:83:7 | 83 | #[cfg(feature = "prost-derive")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `prost-derive` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `prost-derive`: pilota/src/prost/mod.rs#L79
warning: unexpected `cfg` condition value: `prost-derive` --> pilota/src/prost/mod.rs:79:7 | 79 | #[cfg(feature = "prost-derive")] | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `prost-derive` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
unexpected `cfg` condition value: `no-recursion-limit`: pilota/src/prost/mod.rs#L18
warning: unexpected `cfg` condition value: `no-recursion-limit` --> pilota/src/prost/mod.rs:18:11 | 18 | #[cfg(not(feature = "no-recursion-limit"))] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `pb-encode-default-value` and `unstable` = help: consider adding `no-recursion-limit` as a feature in `Cargo.toml` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
test-macos
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-macos
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-macos
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-windows
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-windows
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-windows
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
CI is green
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636