Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/payment-driver/gnt/src/service.rs: error: the trait bound [&str; 3]: From<Vec<&str>> is not satisfied #977

Closed
etam opened this issue Jan 27, 2021 · 2 comments
Assignees

Comments

@etam
Copy link
Contributor

etam commented Jan 27, 2021

rustc version: 1.47.0

cargo build fails with:

error[E0277]: the trait bound `[&str; 3]: std::convert::From<std::vec::Vec<&str>>` is not satisfied
   --> core/payment-driver/gnt/src/service.rs:219:10
    |
219 |         .try_into()
    |          ^^^^^^^^ the trait `std::convert::From<std::vec::Vec<&str>>` is not implemented for `[&str; 3]`
    |
    = help: the following implementations were found:
              <[T; 10] as std::convert::From<generic_array::GenericArray<T, sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UTerm, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B0>, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B0>>>>
              <[T; 11] as std::convert::From<generic_array::GenericArray<T, sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UTerm, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B0>, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B1>>>>
              <[T; 12] as std::convert::From<generic_array::GenericArray<T, sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UTerm, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B0>, sha3::digest::generic_array::typenum::B0>>>>
              <[T; 13] as std::convert::From<generic_array::GenericArray<T, sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UInt<sha3::digest::generic_array::typenum::UTerm, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B1>, sha3::digest::generic_array::typenum::B0>, sha3::digest::generic_array::typenum::B1>>>>
            and 42 others
    = note: required because of the requirements on the impl of `std::convert::Into<[&str; 3]>` for `std::vec::Vec<&str>`
    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::vec::Vec<&str>>` for `[&str; 3]`
    = note: required because of the requirements on the impl of `std::convert::TryInto<[&str; 3]>` for `std::vec::Vec<&str>`

It refers to https://github.com/golemfactory/yagna/blob/pre-rel-v0.6.0-rc2/core/payment-driver/gnt/src/service.rs#L219, which was introduced by #947

@stranger80
Copy link
Contributor

stranger80 commented Jan 28, 2021

I encountered the same, then I upgraded the rust stack to 1.49.0 and the error disappeared.

@etam
Copy link
Contributor Author

etam commented Jan 29, 2021

Until rust-lang/rfcs#2495 is implemented, there's nothing more we can do I think.

@etam etam closed this as completed Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants