fixup! feat(plugin): add async io for the plugin #564
Annotations
42 errors and 90 warnings
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L289
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:289:24
|
289 | return serde_json::to_string(&rpc_response).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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L283
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:283:55
|
283 | let request: Request<serde_json::Value> = serde_json::from_str(&buffer).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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L277
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:277:9
|
277 | asyncio.register().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L276
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:276:27
|
276 | let mut asyncio = AsyncIO::new().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L265
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:265:25
|
265 | let level = LevelFilter::from_str(&level).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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L253
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:253:32
|
253 | let err_resp = serde_json::to_value(json_err).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
|
used `unwrap()` on an `Option` value:
plugin/src/plugin.rs#L212
error: used `unwrap()` on an `Option` value
--> plugin/src/plugin.rs:212:28
|
212 | let notification = self.rpc_notification.get(name).unwrap().clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L144
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:144:68
|
144 | "int" => def_val.and_then(|val| Some(serde_json::json!(val.parse::<i64>().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L142
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:142:63
|
142 | def_val.and_then(|val| Some(serde_json::json!(val.parse::<bool>().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L127
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:127:34
|
127 | let _ = writer.write_all(serde_json::to_string(&request).unwrap().as_bytes());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L84
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:84:13
|
84 | writer.flush().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L82
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:82:28
|
82 | .write_all(serde_json::to_string(&request).unwrap().as_bytes())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L81
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:81:13
|
81 | / writer
82 | | .write_all(serde_json::to_string(&request).unwrap().as_bytes())
83 | | .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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L62
error: used `unwrap()` on a `Result` value
--> plugin/src/io.rs:62:29
|
62 | ... io::stdout().flush().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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L61
error: used `unwrap()` on a `Result` value
--> plugin/src/io.rs:61:29
|
61 | ... io::stdout().write_all(resp.as_bytes()).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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L50
error: used `unwrap()` on a `Result` value
--> plugin/src/io.rs:50:33
|
50 | ... reader.read_exact(&mut byte).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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L40
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
|
used `unwrap()` on a `Result` value:
plugin/src/commands/builtin.rs#L69
error: used `unwrap()` on a `Result` value
--> plugin/src/commands/builtin.rs:69:30
|
69 | let init: InitConf = serde_json::from_value(request.to_owned()).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
|
used `unwrap()` on an `Option` value:
plugin/src/commands/builtin.rs#L61
error: used `unwrap()` on an `Option` value
--> plugin/src/commands/builtin.rs:61:13
|
61 | plugin.option.get_mut(option_name).unwrap().value = Some(option.to_owned());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
|
used `unwrap()` on an `Option` value:
plugin/src/commands/builtin.rs#L60
error: used `unwrap()` on an `Option` value
--> plugin/src/commands/builtin.rs:60:26
|
60 | let option = options.get(option_name).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
note: the lint level is defined here
--> plugin/src/lib.rs:10:9
|
10 | #![deny(clippy::unwrap_used)]
| ^^^^^^^^^^^^^^^^^^^
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L289
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:289:24
|
289 | return serde_json::to_string(&rpc_response).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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L283
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:283:55
|
283 | let request: Request<serde_json::Value> = serde_json::from_str(&buffer).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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L277
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:277:9
|
277 | asyncio.register().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L276
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:276:27
|
276 | let mut asyncio = AsyncIO::new().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L265
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:265:25
|
265 | let level = LevelFilter::from_str(&level).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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L253
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:253:32
|
253 | let err_resp = serde_json::to_value(json_err).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
|
used `unwrap()` on an `Option` value:
plugin/src/plugin.rs#L212
error: used `unwrap()` on an `Option` value
--> plugin/src/plugin.rs:212:28
|
212 | let notification = self.rpc_notification.get(name).unwrap().clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L144
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:144:68
|
144 | "int" => def_val.and_then(|val| Some(serde_json::json!(val.parse::<i64>().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L142
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:142:63
|
142 | def_val.and_then(|val| Some(serde_json::json!(val.parse::<bool>().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L127
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:127:34
|
127 | let _ = writer.write_all(serde_json::to_string(&request).unwrap().as_bytes());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L84
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:84:13
|
84 | writer.flush().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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L82
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:82:28
|
82 | .write_all(serde_json::to_string(&request).unwrap().as_bytes())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
used `unwrap()` on a `Result` value:
plugin/src/plugin.rs#L81
error: used `unwrap()` on a `Result` value
--> plugin/src/plugin.rs:81:13
|
81 | / writer
82 | | .write_all(serde_json::to_string(&request).unwrap().as_bytes())
83 | | .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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L62
error: used `unwrap()` on a `Result` value
--> plugin/src/io.rs:62:29
|
62 | ... io::stdout().flush().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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L61
error: used `unwrap()` on a `Result` value
--> plugin/src/io.rs:61:29
|
61 | ... io::stdout().write_all(resp.as_bytes()).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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L50
error: used `unwrap()` on a `Result` value
--> plugin/src/io.rs:50:33
|
50 | ... reader.read_exact(&mut byte).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
|
used `unwrap()` on a `Result` value:
plugin/src/io.rs#L40
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
|
used `unwrap()` on a `Result` value:
plugin/src/commands/builtin.rs#L69
error: used `unwrap()` on a `Result` value
--> plugin/src/commands/builtin.rs:69:30
|
69 | let init: InitConf = serde_json::from_value(request.to_owned()).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
|
used `unwrap()` on an `Option` value:
plugin/src/commands/builtin.rs#L61
error: used `unwrap()` on an `Option` value
--> plugin/src/commands/builtin.rs:61:13
|
61 | plugin.option.get_mut(option_name).unwrap().value = Some(option.to_owned());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
|
used `unwrap()` on an `Option` value:
plugin/src/commands/builtin.rs#L60
error: used `unwrap()` on an `Option` value
--> plugin/src/commands/builtin.rs:60:26
|
60 | let option = options.get(option_name).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, 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
note: the lint level is defined here
--> plugin/src/lib.rs:10:9
|
10 | #![deny(clippy::unwrap_used)]
| ^^^^^^^^^^^^^^^^^^^
|
Lints
could not compile `clightningrpc-plugin` (lib) due to 21 previous errors; 11 warnings emitted
|
Lints
Clippy had exited with the 101 exit code
|
this `let...else` may be rewritten with the `?` operator:
plugin/src/types.rs#L28
warning: this `let...else` may be rewritten with the `?` operator
--> plugin/src/types.rs:28:9
|
28 | / let Some(ref value) = self.value else {
29 | | return None;
30 | | };
| |__________^ help: replace it with: `let ref value = self.value?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `#[warn(clippy::question_mark)]` on by default
|
unneeded `return` statement:
plugin/src/plugin.rs#L294
warning: unneeded `return` statement
--> plugin/src/plugin.rs:294:17
|
294 | return String::new();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
294 - return String::new();
294 + String::new()
|
|
unneeded `return` statement:
plugin/src/plugin.rs#L289
warning: unneeded `return` statement
--> plugin/src/plugin.rs:289:17
|
289 | return serde_json::to_string(&rpc_response).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
289 - return serde_json::to_string(&rpc_response).unwrap();
289 + serde_json::to_string(&rpc_response).unwrap()
|
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
plugin/src/plugin.rs#L145
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> plugin/src/plugin.rs:145:25
|
145 | "string" => def_val.and_then(|val| Some(serde_json::json!(val))),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `def_val.map(|val| serde_json::json!(val))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
plugin/src/plugin.rs#L144
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> plugin/src/plugin.rs:144:22
|
144 | "int" => def_val.and_then(|val| Some(serde_json::json!(val.parse::<i64>().unwrap()))),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `def_val.map(|val| serde_json::json!(val.parse::<i64>().unwrap()))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
plugin/src/plugin.rs#L142
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> plugin/src/plugin.rs:142:17
|
142 | def_val.and_then(|val| Some(serde_json::json!(val.parse::<bool>().unwrap())))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `def_val.map(|val| serde_json::json!(val.parse::<bool>().unwrap()))`
|
= 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
|
very complex type used. Consider factoring parts into `type` definitions:
plugin/src/plugin.rs#L54
warning: very complex type used. Consider factoring parts into `type` definitions
--> plugin/src/plugin.rs:54:14
|
54 | on_init: Option<Arc<dyn Fn(&mut Plugin<T>) -> Value>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
methods called `into_*` usually take `self` by value:
plugin/src/io.rs#L37
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
|
the following explicit lifetimes could be elided: 'c:
plugin/src/commands/mod.rs#L27
warning: the following explicit lifetimes could be elided: 'c
--> plugin/src/commands/mod.rs:27:18
|
27 | fn call_void<'c>(&self, _plugin: &mut Plugin<T>, _request: &'c serde_json::Value) {}
| ^^ ^^
|
= 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
|
27 - fn call_void<'c>(&self, _plugin: &mut Plugin<T>, _request: &'c serde_json::Value) {}
27 + fn call_void(&self, _plugin: &mut Plugin<T>, _request: &serde_json::Value) {}
|
|
this lifetime isn't used in the function definition:
plugin/src/commands/mod.rs#L18
warning: this lifetime isn't used in the function definition
--> plugin/src/commands/mod.rs:18:13
|
18 | fn call<'c>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
plugin/src/commands/builtin.rs#L54
warning: very complex type used. Consider factoring parts into `type` definitions
--> plugin/src/commands/builtin.rs:54:25
|
54 | pub(crate) on_init: Option<Arc<dyn Fn(&mut Plugin<T>) -> Value>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
single-character string constant used as pattern:
plugin_macros/src/attr_parser.rs#L39
warning: single-character string constant used as pattern
--> plugin_macros/src/attr_parser.rs:39:47
|
39 | let value = value.to_string().replace("\"", "");
| ^^^^ help: consider using a `char`: `'"'`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default
|
this `impl` can be derived:
plugin_macros/src/plugin.rs#L61
warning: this `impl` can be derived
--> plugin_macros/src/plugin.rs:61:1
|
61 | / impl Default for PluginDeclaration {
62 | | fn default() -> Self {
63 | | Self {
64 | | state: None,
... |
70 | | }
71 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
9 + #[derive(Default)]
10 | pub struct PluginDeclaration {
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
plugin_macros/src/plugin.rs#L45
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> plugin_macros/src/plugin.rs:45:47
|
45 | let mut inner = KTokenStream::new(&inner);
| ^^^^^^ help: change this to: `inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
plugin_macros/src/plugin.rs#L30
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> plugin_macros/src/plugin.rs:30:47
|
30 | let mut inner = KTokenStream::new(&inner);
| ^^^^^^ help: change this to: `inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
this `let...else` may be rewritten with the `?` operator:
plugin/src/types.rs#L28
warning: this `let...else` may be rewritten with the `?` operator
--> plugin/src/types.rs:28:9
|
28 | / let Some(ref value) = self.value else {
29 | | return None;
30 | | };
| |__________^ help: replace it with: `let ref value = self.value?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `#[warn(clippy::question_mark)]` on by default
|
unneeded `return` statement:
plugin/src/plugin.rs#L294
warning: unneeded `return` statement
--> plugin/src/plugin.rs:294:17
|
294 | return String::new();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
294 - return String::new();
294 + String::new()
|
|
unneeded `return` statement:
plugin/src/plugin.rs#L289
warning: unneeded `return` statement
--> plugin/src/plugin.rs:289:17
|
289 | return serde_json::to_string(&rpc_response).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
289 - return serde_json::to_string(&rpc_response).unwrap();
289 + serde_json::to_string(&rpc_response).unwrap()
|
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
plugin/src/plugin.rs#L145
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> plugin/src/plugin.rs:145:25
|
145 | "string" => def_val.and_then(|val| Some(serde_json::json!(val))),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `def_val.map(|val| serde_json::json!(val))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
plugin/src/plugin.rs#L144
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> plugin/src/plugin.rs:144:22
|
144 | "int" => def_val.and_then(|val| Some(serde_json::json!(val.parse::<i64>().unwrap()))),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `def_val.map(|val| serde_json::json!(val.parse::<i64>().unwrap()))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
plugin/src/plugin.rs#L142
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> plugin/src/plugin.rs:142:17
|
142 | def_val.and_then(|val| Some(serde_json::json!(val.parse::<bool>().unwrap())))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `def_val.map(|val| serde_json::json!(val.parse::<bool>().unwrap()))`
|
= 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
|
very complex type used. Consider factoring parts into `type` definitions:
plugin/src/plugin.rs#L54
warning: very complex type used. Consider factoring parts into `type` definitions
--> plugin/src/plugin.rs:54:14
|
54 | on_init: Option<Arc<dyn Fn(&mut Plugin<T>) -> Value>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
methods called `into_*` usually take `self` by value:
plugin/src/io.rs#L37
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
|
the following explicit lifetimes could be elided: 'c:
plugin/src/commands/mod.rs#L27
warning: the following explicit lifetimes could be elided: 'c
--> plugin/src/commands/mod.rs:27:18
|
27 | fn call_void<'c>(&self, _plugin: &mut Plugin<T>, _request: &'c serde_json::Value) {}
| ^^ ^^
|
= 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
|
27 - fn call_void<'c>(&self, _plugin: &mut Plugin<T>, _request: &'c serde_json::Value) {}
27 + fn call_void(&self, _plugin: &mut Plugin<T>, _request: &serde_json::Value) {}
|
|
this lifetime isn't used in the function definition:
plugin/src/commands/mod.rs#L18
warning: this lifetime isn't used in the function definition
--> plugin/src/commands/mod.rs:18:13
|
18 | fn call<'c>(
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
plugin/src/commands/builtin.rs#L54
warning: very complex type used. Consider factoring parts into `type` definitions
--> plugin/src/commands/builtin.rs:54:25
|
54 | pub(crate) on_init: Option<Arc<dyn Fn(&mut Plugin<T>) -> Value>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
single-character string constant used as pattern:
plugin_macros/src/attr_parser.rs#L39
warning: single-character string constant used as pattern
--> plugin_macros/src/attr_parser.rs:39:47
|
39 | let value = value.to_string().replace("\"", "");
| ^^^^ help: consider using a `char`: `'"'`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default
|
this `impl` can be derived:
plugin_macros/src/plugin.rs#L61
warning: this `impl` can be derived
--> plugin_macros/src/plugin.rs:61:1
|
61 | / impl Default for PluginDeclaration {
62 | | fn default() -> Self {
63 | | Self {
64 | | state: None,
... |
70 | | }
71 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
9 + #[derive(Default)]
10 | pub struct PluginDeclaration {
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
plugin_macros/src/plugin.rs#L45
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> plugin_macros/src/plugin.rs:45:47
|
45 | let mut inner = KTokenStream::new(&inner);
| ^^^^^^ help: change this to: `inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
plugin_macros/src/plugin.rs#L30
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> plugin_macros/src/plugin.rs:30:47
|
30 | let mut inner = KTokenStream::new(&inner);
| ^^^^^^ help: change this to: `inner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
Lints
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Lints
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1, 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/
|
Lints
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/
|
Lints
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/
|
Lints
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/
|
Lints
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/
|
Build (stable)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Build (stable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Build (stable)
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/
|
Build (stable)
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/
|
Build (stable)
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/
|
Build (stable)
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/
|
Build (stable)
the following packages contain code that will be rejected by a future version of Rust: rstest v0.10.0
|
Build (stable)
the following packages contain code that will be rejected by a future version of Rust: rstest v0.10.0
|
Build (beta)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Build (beta)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Build (beta):
common/src/errors.rs#L21
the item `serde_json` is imported redundantly
|
Build (beta):
plugin_macros/src/lib.rs#L15
struct `Tracer` is never constructed
|
Build (beta)
`clightningrpc-common` (lib) generated 1 warning
|
Build (beta):
plugin/src/plugin.rs#L7
the item `String` is imported redundantly
|
Build (beta):
tests/src/lib.rs#L33
the item `async_run` is imported redundantly
|
Build (beta)
`clightningrpc-plugin` (lib) generated 1 warning
|
Build (beta)
`clightningrpc-plugin-macros` (lib) generated 1 warning
|
Build (beta)
the following packages contain code that will be rejected by a future version of Rust: rstest v0.10.0
|
Build (beta):
plugin_macros/src/lib.rs#L15
struct `Tracer` is never constructed
|
Build (beta)
`clightningrpc-plugin-macros` (lib) generated 1 warning
|
Build (beta):
plugin/src/plugin.rs#L7
the item `String` is imported redundantly
|
Build (beta)
`clightningrpc-plugin` (lib) generated 1 warning
|
Build (beta):
common/src/errors.rs#L21
the item `serde_json` is imported redundantly
|
Build (beta)
`clightningrpc-common` (lib) generated 1 warning
|
Build (beta):
tests/src/lib.rs#L33
the item `async_run` is imported redundantly
|
Build (beta)
`tests` (lib) generated 1 warning
|
Build (beta)
the following packages contain code that will be rejected by a future version of Rust: rstest v0.10.0
|
Build (beta)
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/
|
Build (beta)
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/
|
Build (beta)
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/
|
Build (beta)
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/
|
Build (nightly)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Build (nightly)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Build (nightly)
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/
|
Build (nightly)
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/
|
Build (nightly)
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/
|
Build (nightly)
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/
|
Build (nightly):
plugin_macros/src/lib.rs#L15
struct `Tracer` is never constructed
|
Build (nightly)
`clightningrpc-plugin-macros` (lib) generated 1 warning
|
Build (nightly):
plugin/src/plugin.rs#L7
the item `String` is imported redundantly
|
Build (nightly)
`clightningrpc-plugin` (lib) generated 1 warning
|
Build (nightly):
common/src/errors.rs#L21
the item `serde_json` is imported redundantly
|
Build (nightly)
`clightningrpc-common` (lib) generated 1 warning
|
Build (nightly):
tests/src/lib.rs#L33
the item `async_run` is imported redundantly
|
Build (nightly)
`tests` (lib) generated 1 warning
|
Build (nightly)
the following packages contain code that will be rejected by a future version of Rust: rstest v0.10.0
|
Build (nightly):
tests/src/lib.rs#L33
the item `async_run` is imported redundantly
|
Build (nightly):
common/src/errors.rs#L21
the item `serde_json` is imported redundantly
|
Build (nightly):
plugin_macros/src/lib.rs#L15
struct `Tracer` is never constructed
|
Build (nightly)
`clightningrpc-common` (lib) generated 1 warning
|
Build (nightly):
plugin/src/plugin.rs#L7
the item `String` is imported redundantly
|
Build (nightly)
`clightningrpc-plugin` (lib) generated 1 warning
|
Build (nightly)
`clightningrpc-plugin-macros` (lib) generated 1 warning
|
Build (nightly)
the following packages contain code that will be rejected by a future version of Rust: rstest v0.10.0
|