feat: TON LiteServer ANDL TCP Client #631
pr-check.yml
on: pull_request
Run rust-clippy analyzing
6m 46s
Annotations
58 warnings
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/message.rs#L15
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/message.rs:15:107
|
15 | async fn send_message(&self, request: Request<SendRequest>) -> Result<Response<SendResponse>, Status> {
| ___________________________________________________________________________________________________________^
16 | | let msg = request.into_inner();
17 | |
18 | | let hash = self.client.send_message_returning_hash(&msg.body).await
... |
21 | | Ok(Response::new(SendResponse { hash }))
22 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/block.rs#L79
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/block.rs:79:131
|
79 | async fn get_account_addresses(&self, request: Request<BlockId>) -> Result<Response<Self::GetAccountAddressesStream>, Status> {
| ___________________________________________________________________________________________________________________________________^
80 | | let msg = request.into_inner();
81 | | let block_id = extend_block_id(&self.client, &msg).await
82 | | .map_err(|e: anyhow::Error| Status::internal(e.to_string()))?;
... |
89 | | Ok(Response::new(stream))
90 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/block.rs#L51
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/block.rs:51:144
|
51 | async fn get_transaction_ids(&self, request: Request<GetTransactionIdsRequest>) -> Result<Response<Self::GetTransactionIdsStream>, Status> {
| ________________________________________________________________________________________________________________________________________________^
52 | | let msg = request.into_inner();
53 | |
54 | | let order = msg.order();
... |
73 | | Ok(Response::new(stream))
74 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/block.rs#L36
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/block.rs:36:106
|
36 | async fn get_shards(&self, request: Request<BlockId>) -> Result<Response<GetShardsResponse>, Status> {
| __________________________________________________________________________________________________________^
37 | | let block_id = extend_block_id(&self.client, &request.into_inner()).await
38 | | .map_err(|e: anyhow::Error| Status::internal(e.to_string()))?;
39 | |
... |
45 | | }))
46 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/block.rs#L28
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/block.rs:28:98
|
28 | async fn get_block(&self, request: Request<BlockId>) -> Result<Response<BlockIdExt>, Status> {
| __________________________________________________________________________________________________^
29 | | let block_id = extend_block_id(&self.client, &request.into_inner()).await
30 | | .map_err(|e: anyhow::Error| Status::internal(e.to_string()))?;
31 | |
32 | | Ok(Response::new(block_id.into()))
33 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/block.rs#L20
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/block.rs:20:116
|
20 | async fn get_last_block(&self, _request: Request<GetLastBlockRequest>) -> Result<Response<BlockIdExt>, Status> {
| ____________________________________________________________________________________________________________________^
21 | | let block = self.client.get_masterchain_info().await
22 | | .map_err(|e: anyhow::Error| Status::internal(e.to_string()))?.last;
23 | |
24 | | Ok(Response::new(block.into()))
25 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/account.rs#L73
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/account.rs:73:172
|
73 | async fn get_account_transactions(&self, request: Request<GetAccountTransactionsRequest>) -> std::result::Result<Response<Self::GetAccountTransactionsStream>, Status> {
| ____________________________________________________________________________________________________________________________________________________________________________^
74 | | let msg = request.into_inner();
75 | | let client = self.client.clone();
76 | |
... |
104 | | Ok(Response::new(stream))
105 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/account.rs#L51
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/account.rs:51:147
|
51 | async fn get_shard_account_cell(&self, request: Request<GetShardAccountCellRequest>) -> Result<Response<GetShardAccountCellResponse>, Status> {
| ___________________________________________________________________________________________________________________________________________________^
52 | | let msg = request.into_inner();
53 | |
54 | | let (block_id, cell) = self.fetch_shard_account_cell(&msg)
... |
67 | | Ok(Response::new(response))
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
|
in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`:
ton-grpc/src/account.rs#L25
warning: in a `match` scrutinee, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a `let`
--> ton-grpc/src/account.rs:25:147
|
25 | async fn get_account_state(&self, request: Request<GetAccountStateRequest>) -> std::result::Result<Response<GetAccountStateResponse>, Status> {
| ___________________________________________________________________________________________________________________________________________________^
26 | | let msg = request.into_inner();
27 | |
28 | | let address = AccountAddressData::from_str(&msg.account_address)
... |
47 | | }))
48 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_conditions
= note: `#[warn(clippy::blocks_in_conditions)]` on by default
|
unneeded `return` statement:
tonlibjson-client/src/router.rs#L152
warning: unneeded `return` statement
--> tonlibjson-client/src/router.rs:152:17
|
152 | return Err(RouterError::RouteUnknown);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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`
|
152 - return Err(RouterError::RouteUnknown);
152 + Err(RouterError::RouteUnknown)
|
|
using `clone` on type `Route` which implements the `Copy` trait:
tonlibjson-client/src/router.rs#L97
warning: using `clone` on type `Route` which implements the `Copy` trait
--> tonlibjson-client/src/router.rs:97:31
|
97 | let req = req.clone();
| ^^^^^^^^^^^ help: try removing the `clone` call: `req`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
this `let...else` may be rewritten with the `?` operator:
tonlibjson-client/src/cursor_client.rs#L78
warning: this `let...else` may be rewritten with the `?` operator
--> tonlibjson-client/src/cursor_client.rs:78:9
|
78 | / let Some(seqno) = self.right_end else {
79 | | return None;
80 | | };
| |__________^ help: replace it with: `let seqno = self.right_end?;`
|
= 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
|
wildcard pattern covers any other pattern as it will match anyway:
tonlibjson-client/src/block.rs#L134
warning: wildcard pattern covers any other pattern as it will match anyway
--> tonlibjson-client/src/block.rs:134:13
|
134 | 1 | _ => BlockCriteria::Seqno { shard: self.id.shard, seqno: self.id.seqno }
| ^^^^^
|
= help: consider handling `_` separately
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wildcard_in_or_patterns
= note: `#[warn(clippy::wildcard_in_or_patterns)]` on by default
|
type alias `TonNodeBoxedBlockIdExt` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L442
warning: type alias `TonNodeBoxedBlockIdExt` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:442:10
|
442 | pub type TonNodeBoxedBlockIdExt = TonNodeBlockIdExt;
| ^^^^^^^^^^^^^^^^^^^^^^
|
type alias `LiteServerDebugBoxedVerbosity` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L437
warning: type alias `LiteServerDebugBoxedVerbosity` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:437:10
|
437 | pub type LiteServerDebugBoxedVerbosity = LiteServerDebugVerbosity;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `LiteServerBoxedSignature` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L431
warning: type alias `LiteServerBoxedSignature` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:431:10
|
431 | pub type LiteServerBoxedSignature = LiteServerSignature;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `LiteServerBoxedTransactionId` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L423
warning: type alias `LiteServerBoxedTransactionId` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:423:10
|
423 | pub type LiteServerBoxedTransactionId = LiteServerTransactionId;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `BoxedString` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L422
warning: type alias `BoxedString` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:422:10
|
422 | pub type BoxedString = String;
| ^^^^^^^^^^^
|
type alias `LiteServerBoxedTransactionId3` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L340
warning: type alias `LiteServerBoxedTransactionId3` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:340:10
|
340 | pub type LiteServerBoxedTransactionId3 = LiteServerTransactionId3;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `BoxedTrue` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L292
warning: type alias `BoxedTrue` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:292:10
|
292 | pub type BoxedTrue = True;
| ^^^^^^^^^
|
type alias `LiteServerBoxedLibraryEntry` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L286
warning: type alias `LiteServerBoxedLibraryEntry` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:286:10
|
286 | pub type LiteServerBoxedLibraryEntry = LiteServerLibraryEntry;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `TonNodeBoxedZeroStateIdExt` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L279
warning: type alias `TonNodeBoxedZeroStateIdExt` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:279:10
|
279 | pub type TonNodeBoxedZeroStateIdExt = TonNodeZeroStateIdExt;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `BoxedLong` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L260
warning: type alias `BoxedLong` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:260:10
|
260 | pub type BoxedLong = Long;
| ^^^^^^^^^
|
type alias `BoxedInt` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L234
warning: type alias `BoxedInt` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:234:10
|
234 | pub type BoxedInt = Int;
| ^^^^^^^^
|
type alias `LiteServerBoxedAccountId` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L228
warning: type alias `LiteServerBoxedAccountId` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:228:10
|
228 | pub type LiteServerBoxedAccountId = LiteServerAccountId;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `LiteServerBoxedError` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L222
warning: type alias `LiteServerBoxedError` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:222:10
|
222 | pub type LiteServerBoxedError = LiteServerError;
| ^^^^^^^^^^^^^^^^^^^^
|
type alias `LiteServerBoxedShardBlockLink` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L191
warning: type alias `LiteServerBoxedShardBlockLink` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:191:10
|
191 | pub type LiteServerBoxedShardBlockLink = LiteServerShardBlockLink;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
variants `AdnlMessageQuery` and `AdnlMessageAnswer` are never constructed:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L109
warning: variants `AdnlMessageQuery` and `AdnlMessageAnswer` are never constructed
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:109:5
|
108 | pub enum AdnlBoxedMessage {
| ---------------- variants in this enum
109 | AdnlMessageQuery(AdnlMessageQuery),
| ^^^^^^^^^^^^^^^^
110 | AdnlMessageAnswer(AdnlMessageAnswer),
| ^^^^^^^^^^^^^^^^^
|
= note: `AdnlBoxedMessage` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
|
variants `LiteServerBlockLinkBack` and `LiteServerBlockLinkForward` are never constructed:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L44
warning: variants `LiteServerBlockLinkBack` and `LiteServerBlockLinkForward` are never constructed
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:44:5
|
43 | pub enum LiteServerBoxedBlockLink {
| ------------------------ variants in this enum
44 | LiteServerBlockLinkBack(LiteServerBlockLinkBack),
| ^^^^^^^^^^^^^^^^^^^^^^^
45 | LiteServerBlockLinkForward(LiteServerBlockLinkForward),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `LiteServerBoxedBlockLink` has derived impls for the traits `Debug` and `Clone`, but these are intentionally ignored during dead code analysis
|
type alias `BoxedDouble` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L29
warning: type alias `BoxedDouble` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:29:10
|
29 | pub type BoxedDouble = Double;
| ^^^^^^^^^^^
|
type alias `TonNodeBoxedBlockId` is never used:
/home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs#L1
warning: type alias `TonNodeBoxedBlockId` is never used
--> /home/runner/work/ton-grpc/ton-grpc/target/x86_64-unknown-linux-gnu/debug/build/ton-liteserver-client-28d722c7e7f104dd/out/generated.rs:1:10
|
1 | pub type TonNodeBoxedBlockId = TonNodeBlockId;
| ^^^^^^^^^^^^^^^^^^^
|
type alias `SecureBytes` is never used:
ton-liteserver-client/src/tl.rs#L17
warning: type alias `SecureBytes` is never used
--> ton-liteserver-client/src/tl.rs:17:6
|
17 | type SecureBytes = String;
| ^^^^^^^^^^^
|
type alias `SecureString` is never used:
ton-liteserver-client/src/tl.rs#L16
warning: type alias `SecureString` is never used
--> ton-liteserver-client/src/tl.rs:16:6
|
16 | type SecureString = String;
| ^^^^^^^^^^^^
|
type alias `Int128` is never used:
ton-liteserver-client/src/tl.rs#L12
warning: type alias `Int128` is never used
--> ton-liteserver-client/src/tl.rs:12:6
|
12 | type Int128 = i128;
| ^^^^^^
|
type alias `Int64` is never used:
ton-liteserver-client/src/tl.rs#L10
warning: type alias `Int64` is never used
--> ton-liteserver-client/src/tl.rs:10:6
|
10 | type Int64 = i64;
| ^^^^^
|
type alias `Int53` is never used:
ton-liteserver-client/src/tl.rs#L9
warning: type alias `Int53` is never used
--> ton-liteserver-client/src/tl.rs:9:6
|
9 | type Int53 = i64;
| ^^^^^
|
type alias `Int32` is never used:
ton-liteserver-client/src/tl.rs#L7
warning: type alias `Int32` is never used
--> ton-liteserver-client/src/tl.rs:7:6
|
7 | type Int32 = i32;
| ^^^^^
|
type alias `Double` is never used:
ton-liteserver-client/src/tl.rs#L5
warning: type alias `Double` is never used
--> ton-liteserver-client/src/tl.rs:5:6
|
5 | type Double = f64;
| ^^^^^^
|
associated function `connect` is never used:
ton-liteserver-client/src/client.rs#L8
warning: associated function `connect` is never used
--> ton-liteserver-client/src/client.rs:8:18
|
7 | impl LiteServerClient {
| --------------------- associated function in this implementation
8 | pub async fn connect(addr: SocketAddrV4, server_key: &ServerKey) -> anyhow::Result<Self> {
| ^^^^^^^
|
struct `LiteServerClient` is never constructed:
ton-liteserver-client/src/client.rs#L3
warning: struct `LiteServerClient` is never constructed
--> ton-liteserver-client/src/client.rs:3:12
|
3 | pub struct LiteServerClient {
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
call to `.clone()` on a reference in this situation does nothing:
tl_parser/src/lib.rs#L132
warning: call to `.clone()` on a reference in this situation does nothing
--> tl_parser/src/lib.rs:132:25
|
132 | let prev = input.clone();
| ^^^^^^^^ help: remove this redundant call
|
= note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed
= note: `#[warn(noop_method_call)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
ton-liteserver-client/build.rs#L156
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ton-liteserver-client/build.rs:156:35
|
156 | if skip_list.contains(&&type_ident) {
| ^^^^^^^^^^^^ help: change this to: `(&type_ident)`
|
= 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
|
methods `configure` and `configure_full` are never used:
ton-liteserver-client/build.rs#L125
warning: methods `configure` and `configure_full` are never used
--> ton-liteserver-client/build.rs:125:8
|
117 | impl Generator {
| -------------- methods in this implementation
...
125 | fn configure(mut self, name: &str, derives: Vec<&str>) -> Self {
| ^^^^^^^^^
...
131 | fn configure_full(mut self, name: &str, configuration: TypeConfiguration) -> Self {
| ^^^^^^^^^^^^^^
|
methods `derives`, `field`, and `build` are never used:
ton-liteserver-client/build.rs#L98
warning: methods `derives`, `field`, and `build` are never used
--> ton-liteserver-client/build.rs:98:8
|
97 | impl TypeConfigurationBuilder {
| ----------------------------- methods in this implementation
98 | fn derives(mut self, derives: Vec<&str>) -> Self {
| ^^^^^^^
...
105 | fn field(mut self, field: &str, configuration: FieldConfiguration) -> Self {
| ^^^^^
...
111 | fn build(self) -> TypeConfiguration {
| ^^^^^
|
methods `skip`, `optional`, `deserialize_with`, `serialize_with`, and `build` are never used:
ton-liteserver-client/build.rs#L69
warning: methods `skip`, `optional`, `deserialize_with`, `serialize_with`, and `build` are never used
--> ton-liteserver-client/build.rs:69:8
|
68 | impl FieldConfigurationBuilder {
| ------------------------------ methods in this implementation
69 | fn skip(mut self) -> Self {
| ^^^^
...
74 | fn optional(mut self) -> Self {
| ^^^^^^^^
...
80 | fn deserialize_with(mut self, deserialize_with: &str) -> Self {
| ^^^^^^^^^^^^^^^^
...
86 | fn serialize_with(mut self, serialize_with: &str) -> Self {
| ^^^^^^^^^^^^^^
...
92 | fn build(self) -> FieldConfiguration {
| ^^^^^
|
fields `deserialize_with` and `serialize_with` are never read:
ton-liteserver-client/build.rs#L64
warning: fields `deserialize_with` and `serialize_with` are never read
--> ton-liteserver-client/build.rs:64:9
|
61 | struct FieldConfiguration {
| ------------------ fields in this struct
...
64 | pub deserialize_with: Option<String>,
| ^^^^^^^^^^^^^^^^
65 | pub serialize_with: Option<String>
| ^^^^^^^^^^^^^^
|
fields `skip`, `optional`, `deserialize_with`, and `serialize_with` are never read:
ton-liteserver-client/build.rs#L54
warning: fields `skip`, `optional`, `deserialize_with`, and `serialize_with` are never read
--> ton-liteserver-client/build.rs:54:5
|
53 | struct FieldConfigurationBuilder {
| ------------------------- fields in this struct
54 | skip: bool,
| ^^^^
55 | optional: bool,
| ^^^^^^^^
56 | deserialize_with: Option<String>,
| ^^^^^^^^^^^^^^^^
57 | serialize_with: Option<String>
| ^^^^^^^^^^^^^^
|
fields `derives` and `fields` are never read:
ton-liteserver-client/build.rs#L37
warning: fields `derives` and `fields` are never read
--> ton-liteserver-client/build.rs:37:5
|
36 | struct TypeConfigurationBuilder {
| ------------------------ fields in this struct
37 | derives: Vec<String>,
| ^^^^^^^
38 | fields: HashMap<String, FieldConfiguration>
| ^^^^^^
|
function `configure_field` is never used:
ton-liteserver-client/build.rs#L33
warning: function `configure_field` is never used
--> ton-liteserver-client/build.rs:33:4
|
33 | fn configure_field() -> FieldConfigurationBuilder { Default::default() }
| ^^^^^^^^^^^^^^^
|
function `configure_type` is never used:
ton-liteserver-client/build.rs#L32
warning: function `configure_type` is never used
--> ton-liteserver-client/build.rs:32:4
|
32 | fn configure_type() -> TypeConfigurationBuilder { Default::default() }
| ^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
value assigned to `deserialize_number_from_string` is never read:
ton-liteserver-client/build.rs#L255
warning: value assigned to `deserialize_number_from_string` is never read
--> ton-liteserver-client/build.rs:255:33
|
255 | ... deserialize_number_from_string = true;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: maybe it is overwritten before being read?
|
value assigned to `deserialize_number_from_string` is never read:
ton-liteserver-client/build.rs#L233
warning: value assigned to `deserialize_number_from_string` is never read
--> ton-liteserver-client/build.rs:233:29
|
233 | ... deserialize_number_from_string = true;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: maybe it is overwritten before being read?
= note: `#[warn(unused_assignments)]` on by default
|
variable `deserialize_number_from_string` is assigned to, but never used:
ton-liteserver-client/build.rs#L231
warning: variable `deserialize_number_from_string` is assigned to, but never used
--> ton-liteserver-client/build.rs:231:33
|
231 | let mut deserialize_number_from_string = false; // TODO[akostylev0]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: consider using `_deserialize_number_from_string` instead
|
unused variable: `id`:
ton-liteserver-client/build.rs#L209
warning: unused variable: `id`
--> ton-liteserver-client/build.rs:209:21
|
209 | let id = definition.id();
| ^^ help: if this is intentional, prefix it with an underscore: `_id`
|
= note: `#[warn(unused_variables)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
tonlibjson-client/build.rs#L220
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> tonlibjson-client/build.rs:220:35
|
220 | if skip_list.contains(&&type_ident) {
| ^^^^^^^^^^^^ help: change this to: `(&type_ident)`
|
= 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
|
call to `.clone()` on a reference in this situation does nothing:
tl_parser/src/lib.rs#L132
warning: call to `.clone()` on a reference in this situation does nothing
--> tl_parser/src/lib.rs:132:25
|
132 | let prev = input.clone();
| ^^^^^^^^ help: remove this redundant call
|
= note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed
= note: `#[warn(noop_method_call)]` on by default
|
Run rust-clippy analyzing
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: 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/.
|
Run rust-clippy analyzing
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/
|