You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clippy added a new rule in 1.65.0 related to the size or Err variant on Result. This is rule fails for anchor_lang::error::Error which makes anchor_lang::prelude::Result fail Clippy checks.
41 | pub fn transfer_hook(ctx:Context<Transfer>, amount: u64) -> Result<()> {
| ^^^^^^^^^^ the `Err`-variant is at least 160 bytes
|
= help: try reducing the size of `anchor_lang::error::Error`,for example by boxing large elements or replacing it with `Box<anchor_lang::error::Error>`
= help:for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
anchor-lang = { version = "^0.28.0", features = ["init-if-needed"] }
anchor-spl = { version = "^0.28.0" }
The text was updated successfully, but these errors were encountered:
wjthieme
changed the title
The Err-variant returned from this function is very large
lang: the Err-variant returned from this function is very large
Aug 12, 2023
Clippy added a new rule in 1.65.0 related to the size or Err variant on Result. This is rule fails for anchor_lang::error::Error which makes anchor_lang::prelude::Result fail Clippy checks.
env
deps
The text was updated successfully, but these errors were encountered: