Skip to content

gossip_map: be able to have basic tests on the gossip map #427

gossip_map: be able to have basic tests on the gossip map

gossip_map: be able to have basic tests on the gossip map #427

Triggered via push July 26, 2024 17:32
Status Failure
Total duration 3m 3s
Artifacts

testing.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

1 error and 62 warnings
test
Process completed with exit code 2.
returning the result of a `let` binding from a block: tests/src/lib.rs#L47
warning: returning the result of a `let` binding from a block --> tests/src/lib.rs:47:9 | 46 | let cln = async_run!(cln::Node::with_params("--developer", "regtest")).unwrap(); | -------------------------------------------------------------------------------- unnecessary `let` binding 47 | cln | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 46 ~ 47 ~ async_run!(cln::Node::with_params("--developer", "regtest")).unwrap() |
returning the result of a `let` binding from a block: tests/src/lib.rs#L40
warning: returning the result of a `let` binding from a block --> tests/src/lib.rs:40:9 | 39 | ... let cln = async_run!(cln::Node::with_params(&format!("--developer --plugin={pwd}/target/debug/examples/foo_plugin --plugin={pwd}/target/debug/examples/macros_ex"), "regtest")).unwrap(); | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- unnecessary `let` binding 40 | ... cln | ^^^ | = 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 | 39 ~ 40 ~ async_run!(cln::Node::with_params(&format!("--developer --plugin={pwd}/target/debug/examples/foo_plugin --plugin={pwd}/target/debug/examples/macros_ex"), "regtest")).unwrap() |
usage of an `Arc` that is not `Send` and `Sync`: testing/src/cln.rs#L85
warning: usage of an `Arc` that is not `Send` and `Sync` --> testing/src/cln.rs:85:19 | 85 | let btc = Arc::new(btc); | ^^^^^^^^^^^^^ | = note: `Arc<BtcNode>` is not `Send` and `Sync` as `BtcNode` is not `Sync` = help: if the `Arc` will not used be across threads replace it with an `Rc` = help: otherwise make `BtcNode` `Send` and `Sync` or consider a wrapper type such as `Mutex` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
this `RefCell` reference is held across an `await` point: testing/src/btc.rs#L120
warning: this `RefCell` reference is held across an `await` point --> testing/src/btc.rs:120:24 | 120 | for process in self.process.borrow_mut().iter_mut() { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: ensure the reference is dropped before calling `await` note: these are all the `await` points this reference is held through --> testing/src/btc.rs:121:28 | 121 | process.kill().await?; | ^^^^^ 122 | let _ = process.wait().await?; | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_refcell_ref = note: `#[warn(clippy::await_holding_refcell_ref)]` on by default
`crate` references the macro call's crate: testing/src/lib.rs#L32
warning: `crate` references the macro call's crate --> testing/src/lib.rs:32:17 | 32 | use crate::DEFAULT_TIMEOUT; | ^^^^^ help: to reference the macro definition's crate, use: `$crate` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def = note: `#[warn(clippy::crate_in_macro_def)]` on by default
usage of `contains_key` followed by `insert` on a `HashMap`: gossip_map/src/lib.rs#L185
warning: usage of `contains_key` followed by `insert` on a `HashMap` --> gossip_map/src/lib.rs:185:21 | 185 | / if !self.nodes.contains_key(&node_id) { 186 | | let node = GossipNode::new(node_id.clone(), Some(node_announcement)); 187 | | self.nodes.insert(node_id, node); 188 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry = note: `#[warn(clippy::map_entry)]` on by default help: try | 185 ~ self.nodes.entry(node_id).or_insert_with(|| { 186 + let node = GossipNode::new(node_id.clone(), Some(node_announcement)); 187 + node 188 + }); |
unnecessary use of `to_vec`: gossip_map/src/lib.rs#L121
warning: unnecessary use of `to_vec` --> gossip_map/src/lib.rs:121:50 | 121 | GossipNodeId::from_bytes(&channel_announcement.node_id_2.to_vec()).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `channel_announcement.node_id_2.as_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
unnecessary use of `to_vec`: gossip_map/src/lib.rs#L119
warning: unnecessary use of `to_vec` --> gossip_map/src/lib.rs:119:50 | 119 | GossipNodeId::from_bytes(&channel_announcement.node_id_1.to_vec()).unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `channel_announcement.node_id_1.as_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned = note: `#[warn(clippy::unnecessary_to_owned)]` on by default
useless conversion to the same type: `u64`: gossip_map/src/gossip_types.rs#L134
warning: useless conversion to the same type: `u64` --> gossip_map/src/gossip_types.rs:134:29 | 134 | self.satoshi = Some(amount.satoshis.into()); | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `amount.satoshis` | = 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
this function has too many arguments (9/7): gossip_map/src/bolt7.rs#L84
warning: this function has too many arguments (9/7) --> gossip_map/src/bolt7.rs:84:10 | 84 | #[derive(DecodeWire, EncodeWire, Debug, Clone)] | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: this warning originates in the derive macro `DecodeWire` (in Nightly builds, run with -Z macro-backtrace for more info)
this function has too many arguments (12/7): gossip_map/src/bolt7.rs#L36
warning: this function has too many arguments (12/7) --> gossip_map/src/bolt7.rs:36:10 | 36 | #[derive(DecodeWire, EncodeWire, Debug, Clone)] | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: this warning originates in the derive macro `DecodeWire` (in Nightly builds, run with -Z macro-backtrace for more info)
this function has too many arguments (12/7): gossip_map/src/bolt7.rs#L19
warning: this function has too many arguments (12/7) --> gossip_map/src/bolt7.rs:19:10 | 19 | #[derive(DecodeWire, EncodeWire, Debug, Clone)] | ^^^^^^^^^^ | = 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 = note: this warning originates in the derive macro `DecodeWire` (in Nightly builds, run with -Z macro-backtrace for more info)
fields `crc` and `timestamp` are never read: gossip_map/src/gossip_types.rs#L160
warning: fields `crc` and `timestamp` are never read --> gossip_map/src/gossip_types.rs:160:5 | 157 | pub struct GossipStoredHeader { | ------------------ fields in this struct ... 160 | crc: u32, | ^^^ 161 | timestamp: u32, | ^^^^^^^^^ | = note: `GossipStoredHeader` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
field `inner` is never read: gossip_map/src/gossip_types.rs#L145
warning: field `inner` is never read --> gossip_map/src/gossip_types.rs:145:9 | 144 | pub struct GossipPartialChannel { | -------------------- field in this struct 145 | pub inner: ChannelUpdate, | ^^^^^ | = note: `GossipPartialChannel` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
fields `inner`, `annound_offset`, `scid`, `update_fields`, and `update_offset` are never read: gossip_map/src/gossip_types.rs#L84
warning: fields `inner`, `annound_offset`, `scid`, `update_fields`, and `update_offset` are never read --> gossip_map/src/gossip_types.rs:84:5 | 83 | pub struct GossipChannel { | ------------- fields in this struct 84 | inner: ChannelAnnouncement, | ^^^^^ 85 | annound_offset: u32, | ^^^^^^^^^^^^^^ 86 | scid: ShortChannelId, | ^^^^ ... 89 | update_fields: Vec<HashMap<String, String>>, | ^^^^^^^^^^^^^ 90 | update_offset: Vec<u32>, | ^^^^^^^^^^^^^ | = note: `GossipChannel` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
field `raw_message` is never read: gossip_map/src/gossip_types.rs#L50
warning: field `raw_message` is never read --> gossip_map/src/gossip_types.rs:50:5 | 47 | pub struct GossipNode { | ---------- field in this struct ... 50 | raw_message: Option<NodeAnnouncement>, | ^^^^^^^^^^^ | = note: `GossipNode` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
trait `GossipType` is never used: gossip_map/src/gossip_types.rs#L14
warning: trait `GossipType` is never used --> gossip_map/src/gossip_types.rs:14:7 | 14 | trait GossipType { | ^^^^^^^^^^
field `ty` is never read: gossip_map/src/gossip_stor_wiregen.rs#L49
warning: field `ty` is never read --> gossip_map/src/gossip_stor_wiregen.rs:49:9 | 47 | pub struct GossipStorePrivateUpdateObs { | --------------------------- field in this struct 48 | #[msg_type = 4102] 49 | pub ty: u16, | ^^ | = note: `GossipStorePrivateUpdateObs` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/gossip_stor_wiregen.rs#L41
warning: field `ty` is never read --> gossip_map/src/gossip_stor_wiregen.rs:41:9 | 39 | pub struct GossipStorePrivateChannelObs { | ---------------------------- field in this struct 40 | #[msg_type = 4104] 41 | pub ty: u16, | ^^ | = note: `GossipStorePrivateChannelObs` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/gossip_stor_wiregen.rs#L34
warning: field `ty` is never read --> gossip_map/src/gossip_stor_wiregen.rs:34:9 | 32 | pub struct GossipStoreEnded { | ---------------- field in this struct 33 | #[msg_type = 4105] 34 | pub ty: u16, | ^^ | = note: `GossipStoreEnded` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/gossip_stor_wiregen.rs#L27
warning: field `ty` is never read --> gossip_map/src/gossip_stor_wiregen.rs:27:9 | 25 | pub struct GossipStoreDeleteChan { | --------------------- field in this struct 26 | #[msg_type = 4103] 27 | pub ty: u16, | ^^ | = note: `GossipStoreDeleteChan` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/gossip_stor_wiregen.rs#L20
warning: field `ty` is never read --> gossip_map/src/gossip_stor_wiregen.rs:20:9 | 18 | pub struct GossipStoreChannelAmount { | ------------------------ field in this struct 19 | #[msg_type = 4101] 20 | pub ty: u16, | ^^ | = note: `GossipStoreChannelAmount` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/gossip_stor_wiregen.rs#L12
warning: field `ty` is never read --> gossip_map/src/gossip_stor_wiregen.rs:12:9 | 10 | pub struct GossipStoreChanDying { | -------------------- field in this struct 11 | #[msg_type = 4106] 12 | pub ty: u16, | ^^ | = note: `GossipStoreChanDying` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
constant `GOSSIP_STORE_LEN_RATELIMIT_BIT` is never used: gossip_map/src/flags.rs#L13
warning: constant `GOSSIP_STORE_LEN_RATELIMIT_BIT` is never used --> gossip_map/src/flags.rs:13:11 | 13 | pub const GOSSIP_STORE_LEN_RATELIMIT_BIT: u16 = 0x2000; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
constant `GOSSIP_STORE_LEN_PUSH_BIT` is never used: gossip_map/src/flags.rs#L10
warning: constant `GOSSIP_STORE_LEN_PUSH_BIT` is never used --> gossip_map/src/flags.rs:10:11 | 10 | pub const GOSSIP_STORE_LEN_PUSH_BIT: u16 = 0x4000; | ^^^^^^^^^^^^^^^^^^^^^^^^^
field `ty` is never read: gossip_map/src/bolt7.rs#L132
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:132:9 | 130 | pub struct ReplyShortChannelIdsEnd { | ----------------------- field in this struct 131 | #[msg_type = 262] 132 | pub ty: u16, | ^^ | = note: `ReplyShortChannelIdsEnd` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L120
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:120:9 | 118 | pub struct ReplyChannelRange { | ----------------- field in this struct 119 | #[msg_type = 264] 120 | pub ty: u16, | ^^ | = note: `ReplyChannelRange` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L111
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:111:9 | 109 | pub struct QueryShortChannelIds { | -------------------- field in this struct 110 | #[msg_type = 261] 111 | pub ty: u16, | ^^ | = note: `QueryShortChannelIds` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L101
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:101:9 | 99 | pub struct QueryChannelRange { | ----------------- field in this struct 100 | #[msg_type = 263] 101 | pub ty: u16, | ^^ | = note: `QueryChannelRange` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L87
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:87:9 | 85 | pub struct NodeAnnouncement { | ---------------- field in this struct 86 | #[msg_type = 257] 87 | pub ty: u16, | ^^ | = note: `NodeAnnouncement` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L57
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:57:9 | 55 | pub struct GossipTimestampFilter { | --------------------- field in this struct 56 | #[msg_type = 265] 57 | pub ty: u16, | ^^ | = note: `GossipTimestampFilter` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L39
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:39:9 | 37 | pub struct ChannelUpdate { | ------------- field in this struct 38 | #[msg_type = 258] 39 | pub ty: u16, | ^^ | = note: `ChannelUpdate` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L22
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:22:9 | 20 | pub struct ChannelAnnouncement { | ------------------- field in this struct 21 | #[msg_type = 256] 22 | pub ty: u16, | ^^ | = note: `ChannelAnnouncement` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
field `ty` is never read: gossip_map/src/bolt7.rs#L12
warning: field `ty` is never read --> gossip_map/src/bolt7.rs:12:9 | 10 | pub struct AnnouncementSignatures { | ---------------------- field in this struct 11 | #[msg_type = 259] 12 | pub ty: u16, | ^^ | = note: `AnnouncementSignatures` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
methods `get_channel`, `get_node`, `add_node_announcement`, and `add_channel_announcement` are never used: gossip_map/src/lib.rs#L69
warning: methods `get_channel`, `get_node`, `add_node_announcement`, and `add_channel_announcement` are never used --> gossip_map/src/lib.rs:69:12 | 39 | impl GossipMap { | -------------- methods in this implementation ... 69 | pub fn get_channel(&self, short_chananel_id: &str) -> Option<&GossipChannel> { | ^^^^^^^^^^^ ... 73 | pub fn get_node(&self, node_id: &str) -> Option<&GossipNode> { | ^^^^^^^^ ... 79 | fn add_node_announcement(&mut self, node_announce: NodeAnnouncement) {} | ^^^^^^^^^^^^^^^^^^^^^ ... 82 | fn add_channel_announcement(&mut self, channel_announce: ChannelAnnouncement) {} | ^^^^^^^^^^^^^^^^^^^^^^^^
field `stream` is never read: gossip_map/src/lib.rs#L33
warning: field `stream` is never read --> gossip_map/src/lib.rs:33:5 | 29 | struct GossipMap { | --------- field in this struct ... 33 | stream: Option<BufReader<File>>, | ^^^^^^ | = note: `GossipMap` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default
unused variable: `channel_announce`: gossip_map/src/lib.rs#L82
warning: unused variable: `channel_announce` --> gossip_map/src/lib.rs:82:44 | 82 | fn add_channel_announcement(&mut self, channel_announce: ChannelAnnouncement) {} | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_channel_announce`
unused variable: `node_announce`: gossip_map/src/lib.rs#L79
warning: unused variable: `node_announce` --> gossip_map/src/lib.rs:79:41 | 79 | fn add_node_announcement(&mut self, node_announce: NodeAnnouncement) {} | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_node_announce` | = note: `#[warn(unused_variables)]` on by default
unused macro definition: `to_wire_type_with_size`: gossip_map/src/bolt7.rs#L63
warning: unused macro definition: `to_wire_type_with_size` --> gossip_map/src/bolt7.rs:63:14 | 63 | macro_rules! to_wire_type_with_size { | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_macros)]` 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
redundant pattern matching, consider using `is_ok()`: plugin/src/plugin.rs#L282
warning: redundant pattern matching, consider using `is_ok()` --> plugin/src/plugin.rs:282:19 | 282 | while let Ok(_) = reader.read_line(&mut buffer) { | ----------^^^^^-------------------------------- help: try: `while reader.read_line(&mut buffer).is_ok()` | = 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
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#L53
warning: very complex type used. Consider factoring parts into `type` definitions --> plugin/src/plugin.rs:53:14 | 53 | 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
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
doc list item missing indentation: plugin/src/lib.rs#L6
warning: doc list item missing indentation --> plugin/src/lib.rs:6:5 | 6 | //! When enable provide the typed API to the plugin | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` on by default help: indent this line | 6 | //! When enable provide the typed API to the plugin | +
bound is defined in more than one place: plugin/src/plugin.rs#L236
warning: bound is defined in more than one place --> plugin/src/plugin.rs:236:34 | 236 | pub fn register_notification<F: 'static>(&mut self, name: &str, callback: F) -> Self | ^ 237 | where 238 | F: 'static + RPCCommand<T> + Clone, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: plugin/src/plugin.rs#L216
warning: bound is defined in more than one place --> plugin/src/plugin.rs:216:26 | 216 | pub fn register_hook<F: 'static>( | ^ ... 224 | F: RPCCommand<T> + 'static, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: plugin/src/plugin.rs#L168
warning: bound is defined in more than one place --> plugin/src/plugin.rs:168:27 | 168 | pub fn add_rpc_method<F: 'static>( | ^ ... 176 | F: RPCCommand<T> + 'static, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
bound is defined in more than one place: plugin/src/plugin.rs#L106
warning: bound is defined in more than one place --> plugin/src/plugin.rs:106:20 | 106 | pub fn on_init<C: 'static>(&'a mut self, callback: C) -> Self | ^ 107 | where 108 | C: Fn(&mut Plugin<T>) -> Value, | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations = note: `#[warn(clippy::multiple_bound_locations)]` 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
struct `Tracer` is never constructed: plugin_macros/src/lib.rs#L15
warning: struct `Tracer` is never constructed --> plugin_macros/src/lib.rs:15:8 | 15 | struct Tracer; | ^^^^^^ | = note: `#[warn(dead_code)]` on by default
doc list item missing indentation: rpc/src/lightningrpc.rs#L433
warning: doc list item missing indentation --> rpc/src/lightningrpc.rs:433:9 | 433 | /// `AmountOrAll::All` to spend all available funds | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 433 | /// `AmountOrAll::All` to spend all available funds | ++
doc list item missing indentation: rpc/src/lightningrpc.rs#L382
warning: doc list item missing indentation --> rpc/src/lightningrpc.rs:382:9 | 382 | /// `AmountOrAll::All` to spend all available funds | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 382 | /// `AmountOrAll::All` to spend all available funds | ++
doc list item missing indentation: rpc/src/lightningrpc.rs#L46
warning: doc list item missing indentation --> rpc/src/lightningrpc.rs:46:9 | 46 | /// lightningd. | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation help: indent this line | 46 | /// lightningd. | ++
doc list item missing indentation: rpc/src/lightningrpc.rs#L45
warning: doc list item missing indentation --> rpc/src/lightningrpc.rs:45:9 | 45 | /// socket named `.lightning/lightning-rpc` in the home directory of the user running | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` on by default help: indent this line | 45 | /// socket named `.lightning/lightning-rpc` in the home directory of the user running | ++
test
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/