Skip to content

AccountInfo mismatched types error #129

@midas92

Description

@midas92

In my anchor program, I have met following mismatched types error.

let price_feed = SolanaPriceAccount::account_info_to_feed(price_account_info)

mismatched types
AccountInfo<'_> and AccountInfo<'_> have similar names, but are actually distinct types
account_info.rs(19, 1): AccountInfo<'_> is defined in crate solana_program
lib.rs(22, 1): AccountInfo<'_> is defined in crate solana_account_info

Here is my cargo.toml file.

[dependencies]
anchor-lang = { version = "0.30.1", features = ["init-if-needed"]}
anchor-spl = "0.30.1"
pyth-sdk-solana = "0.10.3"
solana-program = "2.2.1"
libm = "0.2.11"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions