Skip to content

style: rustfmt

style: rustfmt #456

Triggered via push July 13, 2024 02:41
Status Success
Total duration 1m 8s
Artifacts

rust-clippy.yml

on: push
Run rust-clippy analyzing
58s
Run rust-clippy analyzing
Fit to window
Zoom out
Zoom in

Annotations

27 warnings
clamp-like pattern without using clamp function: src/net/live_fluereflow.rs#L147
warning: clamp-like pattern without using clamp function --> src/net/live_fluereflow.rs:147:36 | 147 | let progress = (last_export_guard.elapsed().as_millis() as f64 | ____________________________________^ 148 | | / interval as f64) 149 | | .min(1.0) 150 | | .max(0.0); | |_________________________________^ help: replace with clamp: `(last_export_guard.elapsed().as_millis() as f64 / interval as f64).clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp = note: `#[warn(clippy::manual_clamp)]` on by default
unused import: `pnet::packet::tcp::TcpPacket`: src/net/parser/keys.rs#L17
warning: unused import: `pnet::packet::tcp::TcpPacket` --> src/net/parser/keys.rs:17:5 | 17 | use pnet::packet::tcp::TcpPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `pnet::packet::icmp::IcmpPacket`: src/net/parser/keys.rs#L13
warning: unused import: `pnet::packet::icmp::IcmpPacket` --> src/net/parser/keys.rs:13:5 | 13 | use pnet::packet::icmp::IcmpPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `pnet::packet::dns::DnsPacket`: src/net/parser/keys.rs#L10
warning: unused import: `pnet::packet::dns::DnsPacket` --> src/net/parser/keys.rs:10:5 | 10 | use pnet::packet::dns::DnsPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this function has too many arguments (27/7): fluereflow/src/types/fluereflow.rs#L63
warning: this function has too many arguments (27/7) --> fluereflow/src/types/fluereflow.rs:63:5 | 63 | / pub fn new( 64 | | source: IpAddr, 65 | | destination: IpAddr, 66 | | d_pkts: u32, ... | 90 | | tos: u8, 91 | | ) -> FluereRecord { | |_____________________^ | = 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
returning the result of a `let` binding from a block: fluere-config/src/init.rs#L98
warning: returning the result of a `let` binding from a block --> fluere-config/src/init.rs:98:5 | 97 | let path_config = path_base.join("fluere"); | ------------------------------------------- unnecessary `let` binding 98 | path_config | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 97 ~ 98 ~ path_base.join("fluere") |
unneeded unit expression: fluere-config/src/init.rs#L25
warning: unneeded unit expression --> fluere-config/src/init.rs:25:21 | 25 | () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
Run rust-clippy analyzing
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1, actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Run rust-clippy analyzing
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/clippy-check@v1, actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Run rust-clippy analyzing
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/
Run rust-clippy analyzing
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/
Run rust-clippy analyzing
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/
Run rust-clippy analyzing
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/
clamp-like pattern without using clamp function: src/net/live_fluereflow.rs#L147
warning: clamp-like pattern without using clamp function --> src/net/live_fluereflow.rs:147:36 | 147 | let progress = (last_export_guard.elapsed().as_millis() as f64 | ____________________________________^ 148 | | / interval as f64) 149 | | .min(1.0) 150 | | .max(0.0); | |_________________________________^ help: replace with clamp: `(last_export_guard.elapsed().as_millis() as f64 / interval as f64).clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp = note: `#[warn(clippy::manual_clamp)]` on by default
unused import: `pnet::packet::tcp::TcpPacket`: src/net/parser/keys.rs#L17
warning: unused import: `pnet::packet::tcp::TcpPacket` --> src/net/parser/keys.rs:17:5 | 17 | use pnet::packet::tcp::TcpPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `pnet::packet::icmp::IcmpPacket`: src/net/parser/keys.rs#L13
warning: unused import: `pnet::packet::icmp::IcmpPacket` --> src/net/parser/keys.rs:13:5 | 13 | use pnet::packet::icmp::IcmpPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `pnet::packet::dns::DnsPacket`: src/net/parser/keys.rs#L10
warning: unused import: `pnet::packet::dns::DnsPacket` --> src/net/parser/keys.rs:10:5 | 10 | use pnet::packet::dns::DnsPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this function has too many arguments (27/7): fluereflow/src/types/fluereflow.rs#L63
warning: this function has too many arguments (27/7) --> fluereflow/src/types/fluereflow.rs:63:5 | 63 | / pub fn new( 64 | | source: IpAddr, 65 | | destination: IpAddr, 66 | | d_pkts: u32, ... | 90 | | tos: u8, 91 | | ) -> FluereRecord { | |_____________________^ | = 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
returning the result of a `let` binding from a block: fluere-config/src/init.rs#L98
warning: returning the result of a `let` binding from a block --> fluere-config/src/init.rs:98:5 | 97 | let path_config = path_base.join("fluere"); | ------------------------------------------- unnecessary `let` binding 98 | path_config | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 97 ~ 98 ~ path_base.join("fluere") |
unneeded unit expression: fluere-config/src/init.rs#L25
warning: unneeded unit expression --> fluere-config/src/init.rs:25:21 | 25 | () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
clamp-like pattern without using clamp function: src/net/live_fluereflow.rs#L147
warning: clamp-like pattern without using clamp function --> src/net/live_fluereflow.rs:147:36 | 147 | let progress = (last_export_guard.elapsed().as_millis() as f64 | ____________________________________^ 148 | | / interval as f64) 149 | | .min(1.0) 150 | | .max(0.0); | |_________________________________^ help: replace with clamp: `(last_export_guard.elapsed().as_millis() as f64 / interval as f64).clamp(0.0, 1.0)` | = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() = note: clamp returns NaN if the input is NaN = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp = note: `#[warn(clippy::manual_clamp)]` on by default
unused import: `pnet::packet::tcp::TcpPacket`: src/net/parser/keys.rs#L17
warning: unused import: `pnet::packet::tcp::TcpPacket` --> src/net/parser/keys.rs:17:5 | 17 | use pnet::packet::tcp::TcpPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `pnet::packet::icmp::IcmpPacket`: src/net/parser/keys.rs#L13
warning: unused import: `pnet::packet::icmp::IcmpPacket` --> src/net/parser/keys.rs:13:5 | 13 | use pnet::packet::icmp::IcmpPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `pnet::packet::dns::DnsPacket`: src/net/parser/keys.rs#L10
warning: unused import: `pnet::packet::dns::DnsPacket` --> src/net/parser/keys.rs:10:5 | 10 | use pnet::packet::dns::DnsPacket; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this function has too many arguments (27/7): fluereflow/src/types/fluereflow.rs#L63
warning: this function has too many arguments (27/7) --> fluereflow/src/types/fluereflow.rs:63:5 | 63 | / pub fn new( 64 | | source: IpAddr, 65 | | destination: IpAddr, 66 | | d_pkts: u32, ... | 90 | | tos: u8, 91 | | ) -> FluereRecord { | |_____________________^ | = 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
returning the result of a `let` binding from a block: fluere-config/src/init.rs#L98
warning: returning the result of a `let` binding from a block --> fluere-config/src/init.rs:98:5 | 97 | let path_config = path_base.join("fluere"); | ------------------------------------------- unnecessary `let` binding 98 | path_config | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 97 ~ 98 ~ path_base.join("fluere") |
unneeded unit expression: fluere-config/src/init.rs#L25
warning: unneeded unit expression --> fluere-config/src/init.rs:25:21 | 25 | () | ^^ help: remove the final `()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default