Skip to content

Commit

Permalink
fixup! feat(plugin): add async io for the plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Mar 24, 2024
1 parent b6656e9 commit 5cb78d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ impl AsyncIO {
}

pub fn into_loop<F: FnMut(String) -> String>(&mut self, mut async_callback: F) {

Check warning on line 37 in plugin/src/io.rs

View workflow job for this annotation

GitHub Actions / clippy

methods called `into_*` usually take `self` by value

warning: methods called `into_*` usually take `self` by value --> plugin/src/io.rs:37:50 | 37 | pub fn into_loop<F: FnMut(String) -> String>(&mut self, mut async_callback: F) { | ^^^^^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `#[warn(clippy::wrong_self_convention)]` on by default
let mut events = mio::Events::with_capacity(1024);
loop {
let mut events = mio::Events::with_capacity(1024);
self.poll.poll(&mut events, None).unwrap();

Check failure on line 40 in plugin/src/io.rs

View workflow job for this annotation

GitHub Actions / clippy

used `unwrap()` on a `Result` value

error: used `unwrap()` on a `Result` value --> plugin/src/io.rs:40:13 | 40 | self.poll.poll(&mut events, None).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: if this value is an `Err`, it will panic = help: consider using `expect()` to provide a better panic message = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

for event in events.iter() {
Expand Down

0 comments on commit 5cb78d3

Please sign in to comment.