clippy
67 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 67 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.69.0 (84c898d65 2023-04-16)
- cargo 1.69.0 (6e9a83356 2023-04-12)
- clippy 0.1.69 (84c898d 2023-04-16)
Annotations
Check warning on line 72 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-transfer-authority/src/lib.rs:72:5
|
72 | pub fn accept_transfer<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptTransferCtx<'info>>) -> Result<()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
72 - pub fn accept_transfer<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptTransferCtx<'info>>) -> Result<()> {
72 + pub fn accept_transfer<'info>(ctx: Context<'_, '_, '_, 'info, AcceptTransferCtx<'info>>) -> Result<()> {
|
Check warning on line 44 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-transfer-authority/src/lib.rs:44:5
|
44 | pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
44 - pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> {
44 + pub fn accept_listing<'info>(ctx: Context<'_, '_, '_, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> {
|
Check warning on line 29 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-transfer-authority/src/lib.rs:29:5
|
29 | pub fn release<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ReleaseCtx<'info>>) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
29 - pub fn release<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ReleaseCtx<'info>>) -> Result<()> {
29 + pub fn release<'info>(ctx: Context<'_, '_, '_, 'info, ReleaseCtx<'info>>) -> Result<()> {
|
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-transfer-authority/src/instructions/transfer_authority/release.rs:36:1
|
36 | pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ReleaseCtx<'info>>) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
36 - pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ReleaseCtx<'info>>) -> Result<()> {
36 + pub fn handler<'info>(ctx: Context<'_, '_, '_, 'info, ReleaseCtx<'info>>) -> Result<()> {
|
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-transfer-authority/src/instructions/listing/accept_listing.rs:92:1
|
92 | pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
92 - pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> {
92 + pub fn handler<'info>(ctx: Context<'_, '_, '_, 'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> {
|
Check warning on line 54 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ix`
warning: unused variable: `ix`
--> programs/cardinal-transfer-authority/src/lib.rs:54:63
|
54 | pub fn init_marketplace(ctx: Context<InitMarketplaceCtx>, ix: InitMarketplaceIx) -> Result<()> {
| ^^ help: if this is intentional, prefix it with an underscore: `_ix`
Check warning on line 54 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ctx`
warning: unused variable: `ctx`
--> programs/cardinal-transfer-authority/src/lib.rs:54:29
|
54 | pub fn init_marketplace(ctx: Context<InitMarketplaceCtx>, ix: InitMarketplaceIx) -> Result<()> {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
Check warning on line 44 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ix`
warning: unused variable: `ix`
--> programs/cardinal-transfer-authority/src/lib.rs:44:138
|
44 | ...'info, AcceptListingCtx<'info>>, ix: AcceptListingIx) -> Result<()> {
| ^^ help: if this is intentional, prefix it with an underscore: `_ix`
Check warning on line 44 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ctx`
warning: unused variable: `ctx`
--> programs/cardinal-transfer-authority/src/lib.rs:44:63
|
44 | pub fn accept_listing<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, AcceptListingCtx<'info>>, ...
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
Check warning on line 39 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ix`
warning: unused variable: `ix`
--> programs/cardinal-transfer-authority/src/lib.rs:39:59
|
39 | pub fn update_listing(ctx: Context<UpdateListingCtx>, ix: UpdateListingIx) -> Result<()> {
| ^^ help: if this is intentional, prefix it with an underscore: `_ix`
Check warning on line 39 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ctx`
warning: unused variable: `ctx`
--> programs/cardinal-transfer-authority/src/lib.rs:39:27
|
39 | pub fn update_listing(ctx: Context<UpdateListingCtx>, ix: UpdateListingIx) -> Result<()> {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
Check warning on line 34 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ix`
warning: unused variable: `ix`
--> programs/cardinal-transfer-authority/src/lib.rs:34:59
|
34 | pub fn create_listing(ctx: Context<CreateListingCtx>, ix: CreateListingIx) -> Result<()> {
| ^^ help: if this is intentional, prefix it with an underscore: `_ix`
Check warning on line 34 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ctx`
warning: unused variable: `ctx`
--> programs/cardinal-transfer-authority/src/lib.rs:34:27
|
34 | pub fn create_listing(ctx: Context<CreateListingCtx>, ix: CreateListingIx) -> Result<()> {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
Check warning on line 16 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ix`
warning: unused variable: `ix`
--> programs/cardinal-transfer-authority/src/lib.rs:16:76
|
16 | pub fn init_transfer_authority(ctx: Context<InitTransferAuthorityCtx>, ix: InitTransferAuthorityIx) -> Result<()> {
| ^^ help: if this is intentional, prefix it with an underscore: `_ix`
Check warning on line 16 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unused variable: `ctx`
warning: unused variable: `ctx`
--> programs/cardinal-transfer-authority/src/lib.rs:16:36
|
16 | pub fn init_transfer_authority(ctx: Context<InitTransferAuthorityCtx>, ix: InitTransferAuthorityIx) -> Result<()> {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 56 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unreachable expression
warning: unreachable expression
--> programs/cardinal-transfer-authority/src/lib.rs:56:9
|
55 | return Err(error!(errors::ErrorCode::ProtocolsShutdown));
| -------------------------------------------------------- any code following this expression is unreachable
56 | marketplace::init_marketplace::handler(ctx, ix)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
Check warning on line 46 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unreachable expression
warning: unreachable expression
--> programs/cardinal-transfer-authority/src/lib.rs:46:9
|
45 | return Err(error!(errors::ErrorCode::ProtocolsShutdown));
| -------------------------------------------------------- any code following this expression is unreachable
46 | listing::accept_listing::handler(ctx, ix)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
Check warning on line 41 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unreachable expression
warning: unreachable expression
--> programs/cardinal-transfer-authority/src/lib.rs:41:9
|
40 | return Err(error!(errors::ErrorCode::ProtocolsShutdown));
| -------------------------------------------------------- any code following this expression is unreachable
41 | listing::update_listing::handler(ctx, ix)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
Check warning on line 36 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unreachable expression
warning: unreachable expression
--> programs/cardinal-transfer-authority/src/lib.rs:36:9
|
35 | return Err(error!(errors::ErrorCode::ProtocolsShutdown));
| -------------------------------------------------------- any code following this expression is unreachable
36 | listing::create_listing::handler(ctx, ix)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
Check warning on line 18 in programs/cardinal-transfer-authority/src/lib.rs
github-actions / clippy
unreachable expression
warning: unreachable expression
--> programs/cardinal-transfer-authority/src/lib.rs:18:9
|
17 | return Err(error!(errors::ErrorCode::ProtocolsShutdown));
| -------------------------------------------------------- any code following this expression is unreachable
18 | transfer_authority::init_transfer_authority::handler(ctx, ix)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
|
= note: `#[warn(unreachable_code)]` on by default
Check warning on line 29 in programs/cardinal-use-invalidator/src/lib.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-use-invalidator/src/lib.rs:29:5
|
29 | pub fn invalidate<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, InvalidateCtx<'info>>) -> Result<()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
29 - pub fn invalidate<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, InvalidateCtx<'info>>) -> Result<()> {
29 + pub fn invalidate<'info>(ctx: Context<'_, '_, '_, 'info, InvalidateCtx<'info>>) -> Result<()> {
|
Check warning on line 24 in programs/cardinal-use-invalidator/src/lib.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-use-invalidator/src/lib.rs:24:5
|
24 | pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
24 - pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()> {
24 + pub fn extend_usages<'info>(ctx: Context<'_, '_, '_, 'info, ExtendUsagesCtx<'info>>, payment_amount: u64) -> Result<()> {
|
Check warning on line 37 in programs/cardinal-use-invalidator/src/instructions/invalidate.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
warning: the following explicit lifetimes could be elided: 'key, 'accounts, 'remaining
--> programs/cardinal-use-invalidator/src/instructions/invalidate.rs:37:1
|
37 | pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, InvalidateCtx<'info>>) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
37 - pub fn handler<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, InvalidateCtx<'info>>) -> Result<()> {
37 + pub fn handler<'info>(ctx: Context<'_, '_, '_, 'info, InvalidateCtx<'info>>) -> Result<()> {
|
Check warning on line 24 in programs/cardinal-use-invalidator/src/lib.rs
github-actions / clippy
unused variable: `payment_amount`
warning: unused variable: `payment_amount`
--> programs/cardinal-use-invalidator/src/lib.rs:24:136
|
24 | ...ndUsagesCtx<'info>>, payment_amount: u64) -> Result<()> {
| ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_payment_amount`
Check warning on line 24 in programs/cardinal-use-invalidator/src/lib.rs
github-actions / clippy
unused variable: `ctx`
warning: unused variable: `ctx`
--> programs/cardinal-use-invalidator/src/lib.rs:24:62
|
24 | pub fn extend_usages<'key, 'accounts, 'remaining, 'info>(ctx: Context<'key, 'accounts, 'remaining, 'info, ExtendUsagesCtx<'info>>, pa...
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`