Skip to content

setup gh workflows

setup gh workflows #2

Triggered via pull request November 14, 2023 20:26
Status Success
Total duration 2m 42s
Artifacts

check.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`: src/kiwi/src/main.rs#L52
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` --> src/kiwi/src/main.rs:52:23 | 52 | let pre_forward = config | _______________________^ 53 | | .plugins 54 | | .and_then(|plugins| plugins.pre_forward) 55 | | .and_then(|path| { 56 | | Some(WasmPlugin::from_file(path).expect("failed to load pre-forward plugin")) 57 | | }); | |__________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map = note: `#[warn(clippy::bind_instead_of_map)]` on by default help: try | 52 ~ let pre_forward = config 53 + .plugins 54 ~ .and_then(|plugins| plugins.pre_forward).map(|path| WasmPlugin::from_file(path).expect("failed to load pre-forward plugin")); |
redundant pattern matching, consider using `is_err()`: src/kiwi/src/ws.rs#L108
warning: redundant pattern matching, consider using `is_err()` --> src/kiwi/src/ws.rs:108:56 | 108 | ... if let Err(_) = cmd_tx.send(cmd) { | -------^^^^^^------------------- help: try: `if cmd_tx.send(cmd).is_err()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
use of `expect` followed by a function call: src/kiwi/src/source/kafka.rs#L88
warning: use of `expect` followed by a function call --> src/kiwi/src/source/kafka.rs:88:58 | 88 | self.inner.subscribe(&[&self.topic]).expect( | __________________________________________________________^ 89 | | format!("failed to subscribe to kafka topic {}", &self.topic).as_str(), 90 | | ); | |_____________________^ help: try: `unwrap_or_else(|_| panic!("failed to subscribe to kafka topic {}", &self.topic))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call = note: `#[warn(clippy::expect_fun_call)]` on by default
useless conversion to the same type: `std::string::String`: src/kiwi/src/plugin/wasm/bridge.rs#L70
warning: useless conversion to the same type: `std::string::String` --> src/kiwi/src/plugin/wasm/bridge.rs:70:42 | 70 | .map(|(k, v)| (k.into(), v.into())) | ^^^^^^^^ help: consider removing `.into()`: `v` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `std::string::String`: src/kiwi/src/plugin/wasm/bridge.rs#L70
warning: useless conversion to the same type: `std::string::String` --> src/kiwi/src/plugin/wasm/bridge.rs:70:32 | 70 | .map(|(k, v)| (k.into(), v.into())) | ^^^^^^^^ help: consider removing `.into()`: `k` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `std::option::Option<std::vec::Vec<u8>>`: src/kiwi/src/plugin/wasm/bridge.rs#L30
warning: useless conversion to the same type: `std::option::Option<std::vec::Vec<u8>>` --> src/kiwi/src/plugin/wasm/bridge.rs:30:22 | 30 | payload: value.payload.into(), | ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `value.payload` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
module has the same name as its containing module: src/kiwi/src/plugin/mod.rs#L1
warning: module has the same name as its containing module --> src/kiwi/src/plugin/mod.rs:1:1 | 1 | mod plugin; | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception = note: `#[warn(clippy::module_inception)]` on by default
redundant pattern matching, consider using `is_err()`: src/kiwi/src/ingest.rs#L111
warning: redundant pattern matching, consider using `is_err()` --> src/kiwi/src/ingest.rs:111:28 | 111 | if let Err(_) = self.msg_tx.send(Message::Notice(Notice::Lag { | ^^^^^^ | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching help: try | 111 ~ if self.msg_tx.send(Message::Notice(Notice::Lag { 112 + source: source_id, 113 + count, 114 ~ })).is_err() { |
redundant pattern matching, consider using `is_err()`: src/kiwi/src/ingest.rs#L102
warning: redundant pattern matching, consider using `is_err()` --> src/kiwi/src/ingest.rs:102:28 | 102 | if let Err(_) = self.forward_event(event).await { | -------^^^^^^---------------------------------- help: try: `if (self.forward_event(event).await).is_err()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-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/