metaplex-cli icon indicating copy to clipboard operation
metaplex-cli copied to clipboard

error[E0277]: the trait bound `T: borsh::de::BorshDeserialize` is not satisfied

Open 7flash opened this issue 6 months ago • 1 comments

cargo build
   Compiling rustls-webpki v0.101.7
   Compiling sct v0.7.1
   Compiling solana-zk-token-sdk v1.17.13
   Compiling solana-measure v1.17.13
   Compiling zstd-safe v5.0.2+zstd.1.5.2
   Compiling zstd-sys v2.0.9+zstd.1.5.5
   Compiling solana-version v1.17.13
   Compiling solana-remote-wallet v1.17.13
   Compiling metaplex-token-vault v0.0.1
   Compiling zstd v0.11.2+zstd.1.5.2
   Compiling rustls v0.21.10
   Compiling webpki-roots v0.24.0
   Compiling solana-net-utils v1.17.13
error[E0277]: the trait bound `T: borsh::de::BorshDeserialize` is not satisfied
   --> /Users/gur/.cargo/registry/src/index.crates.io-6f17d22bba15001f/metaplex-token-vault-0.0.1/src/utils.rs:261:21
    |
261 |     let result: T = try_from_slice_unchecked(data)?;
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `borsh::de::BorshDeserialize` is not implemented for `T`
    |
note: required by a bound in `solana_program::borsh::try_from_slice_unchecked`
   --> /Users/gur/.cargo/registry/src/index.crates.io-6f17d22bba15001f/solana-program-1.17.13/src/borsh.rs:38:36
    |
38  | pub fn try_from_slice_unchecked<T: BorshDeserialize>(data: &[u8]) -> Result<T, Error> {
    |                                    ^^^^^^^^^^^^^^^^ required by this bound in `try_from_slice_unchecked`
help: consider further restricting this bound
    |
250 | pub fn try_from_slice_checked<T: BorshDeserialize + borsh::de::BorshDeserialize>(
    |                                                   +++++++++++++++++++++++++++++

For more information about this error, try `rustc --explain E0277`.
error: could not compile `metaplex-token-vault` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

7flash avatar Dec 29 '23 07:12 7flash